For some reason Apache is redirecting URL's without ending slashes to URL's ending with slashes though only if there is a dash in the URL without the ending slash. To make sure it was Apache I had PHP die() at the
very first line and then tested my site without a slash on the same page both for 200 and 404 situations so I'm 99.9% it's Apache not liking the dash in the URL. I'd like to keep the dash versus using underscores as I remember a thread here on this site that emphasized Google prefers dashes over underscores.
In example a URL that shouldn't redirect would be...
/computers/socket-939
...which keeps redirecting to...
/computers/socket-939/
Removing the slash stops the redirect though it's not a single word...
/computers/socket939
Here is the slimmed down script that I'm using with the exact same reproducible results, thoughts please?
- John
RewriteEngine on
RewriteRule ^(test1\.php|exampledir/) - [L]
RewriteRule !\.(css|cur|zip)$ index.php