htaccess remove extension, same name for page and folder
www.example.com/tires www.example.com/tires/slicks
When I click on the slicks page on a breadcrumb to "tires" it shows example.com/tires/ instead of .com/tires and then the links on the page become messed up.
How do I make it work all the way around?
I have seen it working flawlessly on a few other sites
here is my current htaccess
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
Options +FollowSymLinks
ErrorDocument 404 /404/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.htm HTTP/
RewriteRule ^index.htm$ http://www.example.com/ [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
RewriteRule ^index.htm$ http://example.com/ [R=301,L]
# Unless directory, remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ http://www.example.com/$1 [R=301,L]
# Redirect external .php requests to extensionless url
RewriteCond %{THE_REQUEST} ^(.+).php([#?][^ ]*)? HTTP/
RewriteRule ^(.+).php$ http://www.example.com/$1 [R=301,L]
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s([^.]+).php [NC]
RewriteRule ^ %1 [R,L,NC]
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) $1.php [L] -
minirich -
Thanks
{{ DiscussionBoard.errors[9438300].message }} -
-
minirich -
Thanks - 1 reply
{{ DiscussionBoard.errors[9438305].message }}-
Lukas -
Thanks - 1 reply
{{ DiscussionBoard.errors[9438893].message }}-
minirich -
Thanks
{{ DiscussionBoard.errors[9440999].message }} -
-
-