Re: URL Rewrite???
| From: | Jochem Maas | Date: | Tue, 13 Jun 2006 15:06:58 +0000 |
| Subject: | Re: URL Rewrite??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237900@lists.php.net to get a copy of this message | ||
Keith wrote:
> Hi all
>
> Not really a php issue per se - sorry.
> But I'm sure someone here is bound to know the answer. :-)
>
> I have a main site that is accessible at say
> "http://www.somedomain.com/somedir/" but I want
> visitors to be able to
> access the site using simply "http://www.somedomain.com"?z>ºuÁ`Å >
> .|»# AND for the
> resulting URL displayed to STILL say
> "http://www.somedomain.com" and not
> "http://www.somedomain.com/somedir/".
>
> Should this be possible using the .htaccess file and some mod_rewrite rule?
> Toyed around with that but couldn't get it to work.
when you finished toying did you take time to read the Apache docs on mod_rewrite?
you need *something like*:
RewriteRule ^/(.*)$ /somedir/$1 [L]
>
> ANY help would be greatly appreciated, thanks
>
> P.S. Platform: Linux RedHat (running Apache)
>
> scorpy
>