> Date: Sunday, May 01, 2022 18:13:54 +1200 > From: gordonisnz@xxxxxxxxx > > Hmm a weekend wasted - thought it was going, but that only lasted > 5 minutes - now not going. > > 1) Ive moved my "office" script into /office2/ subdirectory > > 2) no htaccess in my office2 subdirectory. changed all links/URLs > in my HTML output to go to /office2/ > > 3) the htaccess in my root/main directory has lines to EXCLUDE the > /office2/ directory but I still get redirected to /office/ when I > submit my form. > > my main / top htaccess is:- > > RewriteEngine On > RewriteBase / > > RewriteRule ^(css) - [L] > RewriteRule ^office2/ - [L] - QUESTION: (DOES THIS EXCLUDE > SUBDIRECTORY ??) > RewriteRule ^login login.php [NC,QSA,L] > RewriteRule ^(.*)/(.*)$ index.php [NC,QSA,L] > RewriteRule ^(.*)$ index.php [NC,QSA,L] > A couple of observations/notes: - rewrite rules are a part of the apache configuration and not related to php proper. [obviously they will impact how php pages are displayed, but they aren't a part of php.] - you need to turn on and review rewrite rule logging. - some aspects of rewrite rules (specifically logging) are apache-version dependent, but you haven't included any mention of either your apache or php version. - it's rather unclear what you are trying to accomplish and why all the rewrite rules. you need to provide a fairly detailed description of your set up, structure and goals in order for people to provide insights. a plethora of rewrite rules are generally unnecessary/undesired. - it's not clear what you are referring to here: > but that only lasted 5 minutes - now not going. things don't "magically" work or stop working on their own, so this implies that you did something that caused things to stop working. when debugging - make *one* action/change, document/test then make another (single) action/change, etc. save your state incrementally so that you can roll back. i.e., don't try to remember what you did/typed (you may not have actually made the change you think you did). rather keep explicit backups then use diff (or equiv) to see changes if/as necessary.