Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Rewrite htaccess file correctly to remove the www
Hello. What is the correct way to alter the htaccess file so my site will automatically go to mysite.com and not www.mysite.com
Art Rogue – Fine Art Photography
Offline
#2 2008-04-30 13:21:20
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Rewrite htaccess file correctly to remove the www
I’ve used this one.
The only thing it wont do for me is redirecting an address containing a section like for instance www.domian.com/about/
to domain.com/about/
Instead it redirects to domain.com/index.php/
bringing up the error page, since there is no directory “index.php”. I suspect, it has something to do with the rules in txp’s default .htaccess file, so if anyone had an idea how to make it work, I’d love to hear it.
Last edited by masa (2008-04-30 13:39:21)
Offline
#3 2008-04-30 13:43:01
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Rewrite htaccess file correctly to remove the www
You need to put those rules above the Txp rules, and make this [R=Permanent]
into this [R=Permanent,L]
.
Offline