remove index.php from domain name

Using a single web hosting account to host multiple sites

remove index.php from domain name

Postby rhodesia1 » Wed Apr 04, 2007 7:43 pm

Hello

I would like to know the rewrite to change www.mydomain.com/index.php in the browser bar to www.mydomain.com

Basically, if you go to the domain it displays the index.php file at the end, can you remove the filename index.php from the browser bar window using mod_rewrite?

The site doesnt use display this if it is index.html only index.php will it show the filename

Thanks for any help
rhodesia1
 
Posts: 3
Joined: Wed Nov 15, 2006 3:05 pm

Postby richardk » Sat Apr 07, 2007 12:49 pm

if you go to the domain it displays the index.php file at the end

Even if you don't type it in the address bar?

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^index\.php$ / [NC,R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 31 guests

cron