301 Redirect / Pretty URLs
Posted: Wed Jan 30, 2008 9:48 pm
Hello all,
I was able to get Pretty URL's working great. Can't get the 301 redirects for the old pages to work though. I've spent the last few hours trying about every possible scenario and can't get it to work.
General consensus is that my .htaccess file should be something like...
...but no love. Funny thing is that I can get pretty much ANY file EXCEPT index.php to take. If I test it with index.html instead, then it works fine.
Any thoughts? I'd really appreciate it.
Philip
I was able to get Pretty URL's working great. Can't get the 301 redirects for the old pages to work though. I've spent the last few hours trying about every possible scenario and can't get it to work.
General consensus is that my .htaccess file should be something like...
Code: Select all
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
# Make sure you have Options FollowSymLinks
# and Allow on
RewriteEngine On
#NEW RULE HERE
RewriteRule ^index\.php\?page=about-us$ http://www.domain.tld/about-us.html
#Rewrites page.shtml as index.php?page
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Any thoughts? I'd really appreciate it.
Philip