Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2012-02-16, 07:05 AM   #1
jollyhumper
That's what she said
 
jollyhumper's Avatar
 
Join Date: Feb 2012
Location: Norway
Posts: 2,627
Send a message via ICQ to jollyhumper
.htaccess

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.
Code:
Redirect www to non-www:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
thanks!
Mrten
jollyhumper is offline   Reply With Quote
Old 2012-02-16, 07:50 AM   #2
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Out of curiosity, do you have the text "Redirect www to non-www:" in your .htaccess file?

If so, delete it.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2012-02-16, 07:53 AM   #3
jollyhumper
That's what she said
 
jollyhumper's Avatar
 
Join Date: Feb 2012
Location: Norway
Posts: 2,627
Send a message via ICQ to jollyhumper
Quote:
Originally Posted by Useless Warrior View Post
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 is offline   Reply With Quote
Old 2012-02-16, 07:57 AM   #4
jollyhumper
That's what she said
 
jollyhumper's Avatar
 
Join Date: Feb 2012
Location: Norway
Posts: 2,627
Send a message via ICQ to jollyhumper
Quote:
Originally Posted by jollyhumper View Post
Nope, I don't.

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

Mrten
jollyhumper is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:18 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc