Hey Guys. I am working on optimizing a website and trying to create a better link structure for my client. However I have a problem http://www.aieus.com/faq works perfect. http://www.aieus.com/faq/ gives me 500 internal server error. here is my .htaccess code. please inform me if i did something wrong or missing something Options +FollowSymlinks RewriteEngine on RewriteBase / rewritecond %{http_host} ^aieus\.com [nc] rewriterule ^(.*)$ http://www.aieus.com/$1 [r=301,nc] #Fix Rewrite Options -Multiviews ## EXTENSION REWRITE HIDE PHP# RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php [L,QSA] ## Errors ## ErrorDocument 404 /404.php
Adding this should fix it. RewriteRule ^(.*)/(.*)$ $1.php [L,QSA] Code (markup): Tbh I don't really know how it works with RewriteConditions. Guess you've got to find that out by yourself
Hey, this has given me the visa versa effect. d.com/abc/ worked fine and I got 404 for d.com/abc have any other idea?
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*[^/])$ $1.php [L,QSA] RewriteRule ^(.*)/(.*)$ $1.php [L,QSA] Code (markup): Works for me.