PDA

View Full Version : .htaccess


jollyhumper
2012-02-16, 08:05 AM
Hi

I'm struggling with this redirection thingy.
I want my sites to be without www, so SearchEngines only reads and checks the http:/domain,com and redirects those few that actually ever will type my url in, with a www first back to the non-www.

I got a script at GFY, but it just makes an hopeless loop, upon asking for further hints they've been dead silent. as usual.

What's said at gfy. Makes an endless loop.
Redirect www to non-www:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

thanks!
M:)rten

Useless
2012-02-16, 08:50 AM
Out of curiosity, do you have the text "Redirect www to non-www:" in your .htaccess file?

If so, delete it.

jollyhumper
2012-02-16, 08:53 AM
Out of curiosity, do you have the text "Redirect www to non-www:" in your .htaccess file?

If so, delete it.

Nope, I don't. :)

Jolly

jollyhumper
2012-02-16, 08:57 AM
Nope, I don't. :)

Jolly

I've figured it out now, works like a sharm. Thx!

M:)rten