Re: Remove index.php from url

From: Date: Sat, 11 Oct 2008 16:02:31 +0000
Subject: Re: Remove index.php from url
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-281714@lists.php.net to get a copy of this message
Shawn McKenzie wrote: > OOzy Pal wrote: >> Hello, >> >> I expect that this question been beaten to death. I googled for many hours >> and all what I found is related to one CMS or another. I want to do is to >> make a very very very simple index.php that when is it called it >> automatically detect the page and load it. For example, when I call >> >> www.xyz.com/index.php/company, it calls for company.html. I have made that >> index.php. Now I need to remove this index.php from the url. >> >> Can you help? >> > mod_rewite if you use Apache. In the simplest form (not tested): > > .htaccess > > RewriteRule ^index\.php\/(.*)$ $1 [L,NC,NS] > > HTH > -Shawn Scrub that. The rule is backwards. But mod_rewrite is the answer. -Shawn

« previous php.general (#281714) next »