I know this sorta thing has been asked many times, and i'v probably read them all, but since i cannot find a solution im going to have to ask. I'm with hostgator and know the support mod_rewrite etc..but i cant seem to get it to work on my website. I'm trying to get: index.php?article=Something-about-something to apear as Something-about-something.html and iv tried everything, then a variation or everything and even the support team at hostgator say it all looks fine and should work. I'v tried: Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.+)\.html$ index.php?article=$1 Code (markup): and Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^(.*)\.html$ index.php?article=$1 [L] Code (markup): basically i'm either stumped or stupid or both.
Looks fine to me. I'd suggest enabling rewrite logging to try and see what mod_rewrite is doing or trying to do. Just add into the end of your httpd.conf (and restart, obviously): RewriteLog /path/to/logfile/to/create.txt RewriteLogLevel 5 Then check the log file and see whats going on. Remember to remove the lines again afterwards otherwise you could end up with gigabytes worth of logs..
I'v made some progress, this here Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)\.html$ index.php?article=$1 Code (markup): works on my home machine when testing my site and gives the exact result, but on my site (with Hostgator.com) all i get is a "Error 404 page not found". Anyone have any ideas or suggestions?
Additionally..after some reading i think it might have something to do with phpsuexec? Can anyone tell me how to turn this off or at lease a workaround please?
Do a little test. Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^wacko\.html$ index.php [L] domain.com/wacko.html should show the index page.