Jump to content

Rewrite Rule Problem


shah_ankitb

Recommended Posts

RewriteEngine On#Translate default page to rootRewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php5|html|php)\ HTTPRewriteRule ^(.*)index\.(php5|html|php)$ /$1 [R=301,L]#Translate http://www.xyz.com/index.php?page=contact-us  -> http://www.xyz.com/contact-us.htmlRewriteRule ^/(.*)\.html$ //page=$1

Put that in a file called .htaccess and save it at the webroot. I haven't tested the second one, but it should be ok.

Link to comment
Share on other sites

Neither one of them works?

Link to comment
Share on other sites

Note that .htaccess files and mod_rewrite are Apache server configuration settings and have nothing to do with PHP. They will work even if mod_php is not installed.

Link to comment
Share on other sites

Well, what happens when you try? 500 error? Just doesn't rewrite?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...