Forum Moderators: phranque
For example, if i type in "/bigFolder/smallFolder" AND those two folders exists, Apache will serve those real pages... I don't want this.
What I do want however, if i do "/fakeFolder/moreFolder" the RewriteEngine will execute "ht.php?first=bigFolder&second=smallFolder" because the structure doesn't exist.
I want everything to go thru "ht.php," even if the files exists.
Here's my test .htaccess code.
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^([a-z]+)/([a-z]+)$ ht.php?first=$1&second=$2
Any ideas? I am, of course, open to other solutions.
-Lance
Are you running Apache 2.0 or later? If so, disable AcceptPathInfo.
Also, add -MultiViews to your Options directive to disable content-negotiation if you're not using it.
See Apache core directives documentation for more info about these directives and how they may relate to your problem.
The only (minor) problem I see with the code is that your RewriteRule should have an [L] flag on it for the sake of efficiency.
Jim
This is not "the filesystem" causing this problem. It is some other "active agent" such as an Apache module or another one of your scripts causing it. Look into any other mod_alias and/or mod_rewrite directives in httpd.conf, conf.d, any other configuration files included in those, and in .htaccess. Obviously, some directive is being applied before your rewrite code can run, and is diverting the request.
Jim