I'm looking to simplify my .htaccess a bit, I know there's prob a couple lines I could use instead of rewriting the main pages manually but I can't seem to get it to fully work, the way I got works perfect now, but would like it written the right way, lol. Current .htaccess Options -Indexes RewriteEngine on RewriteCond %{http_host} ^racecarracinggames.com [nc] RewriteRule ^(.*)$ http://www.racecarracinggames.com/$1 [r=301,nc] RewriteRule ^index\.html$ index.php [L] RewriteRule ^index2\.html$ pages/index2.php RewriteRule ^index3\.html$ pages/index3.php RewriteRule ^index4\.html$ pages/index4.php RewriteRule ^links\.html$ pages/links.html RewriteRule ^links2\.html$ pages/links2.html RewriteRule ^links3\.html$ pages/links3.html RewriteRule ^([_A-Za-z0-9-]+).html/?$ play/$1.php Code (markup): What I Tried Using, but only worked for half the pages, rest show 404 error Options -Indexes RewriteEngine on RewriteCond %{http_host} ^racecarracinggames.com [nc] RewriteRule ^(.*)$ http://www.racecarracinggames.com/$1 [r=301,nc] RewriteRule ^index\.html$ index.php [L] RewriteRule ^([_A-Za-z0-9-]+).html/?$ pages/$1.php RewriteRule ^([_A-Za-z0-9-]+).html/?$ play/$1.php Code (markup):
It should scale with index|links 1-N & [L] is used to keep the last few rules from being evaluated when they don't need to be. Options -Indexes RewriteEngine On RewriteCond %{HTTP_HOST} ^racecarracinggames [NC] RewriteRule ^(.*)$ http://www.racecarracinggames.com/$1 [R=301] RewriteRule ^(index[0-9]*)\.html$ pages/$1.php [L,NC] RewriteRule ^(links[0-9]*)\.html$ pages/$1.html [L,NC] RewriteRule ^([_a-z0-9-]+).html/?$ play/$1.php [NC] Code (markup): If this works for you shoot me a PM & I'll reply with a Paypal link you can do whatever you want with.