[OT] non-www to www redirect works with a little issue
- From: "J. Bakshi" <bakshi12@xxxxxxxxx>
- Date: Fri, 25 May 2012 17:05:44 +0530
Hello list,
I have place the following in my .htaccess to redirect non-www to www redirection
`````````````
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule ^(.*) http://www.example.com/$1 [R=301]
```````````````
The redirect work well but a little hitch.
Say If I visit http://example.com/page1.html it redirect to
http://www.example.com so at the home page. Where it should
append the www before the link, but not alter the link.
What modification should I add here to make it work ?
Thanks
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/20120525170544.3d953a95@xxxxxxxxxxxxxxxx
- Follow-Ups:
- Re: [OT] non-www to www redirect works with a little issue
- From: Camaleón
- Re: [OT] non-www to www redirect works with a little issue
- Prev by Date: how to update Debian OS properly
- Next by Date: Re: how to update Debian OS properly
- Previous by thread: how to update Debian OS properly
- Next by thread: Re: [OT] non-www to www redirect works with a little issue
- Index(es):
Relevant Pages
|