FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

rewrite rule htaccess

 


sonam
I am not sure, but it is looking I am doing something wrong. There is two question important for me.
1. I would like to display html extension instead of php. How I can do this? I have this htaccess but it is not working.
Code:
Options +FollowSymLinks +Indexes
RewriteEngine on
RewriteBase /
RewriteRule ^([^.]+)\.html$ $1.php [L]


2. What search engine see if I use rewrite rule when is comming on my site - html or php extension? This is very important for me because if they see (original) php extension then I didn't revrite rule.

Sonam
jmlworld
You don't need +Indexes. The code below works well for me.

Code:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.htm$ $1.php [L]


As you see above, I terminated the +Indexes as well as I modified RewriteRule from RewriteRule ^([^.]+)\.html$ $1.php to RewriteRule ^(.*)\.htm$ $1.php [L]

By the way, you can use [nc] (Not case sensitive) instead of [L] (Lower case).

Good luck
sonam
Thanks, I will give a try.

Sonam
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.