Re: Re: Remove index.php from url
| From: | Ashley Sheridan | Date: | Sat, 11 Oct 2008 16:44:11 +0000 |
| Subject: | Re: Re: Remove index.php from url | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281718@lists.php.net to get a copy of this message | ||
On Sat, 2008-10-11 at 11:02 -0500, Shawn McKenzie wrote:
> 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
>
Incidentally, does anyone know how this would be achieved on IIS? We've
got a site at work that's running off a CMS I knocked up, but they'd
prefer the URLs to look proper, without the query string.
Ash
www.ashleysheridan.co.uk