Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-26-2011, 01:24 AM   PM User | #1
basketmen
New Coder

 
Join Date: Mar 2007
Posts: 90
Thanks: 2
Thanked 0 Times in 0 Posts
basketmen is an unknown quantity at this point
Redirect WWW to non WWW, for primary domain, and parked domain

Hi guys,

I already know basic Redirect www to non-www, using htaccess:

Quote:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]





but how if we have parked domain too?

I already tried this but its not works, its says "The page isn't redirecting properly"

Quote:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www.yourdomain2.com [NC]
RewriteRule ^(.*)$ http://yourdomain2.com/$1 [L,R=301]




please share your knowledge, what is the best way for this?
__________________
Whats up
basketmen is offline   Reply With Quote
Old 10-26-2011, 06:06 PM   PM User | #2
IAwebdeveloper
New to the CF scene

 
Join Date: Oct 2011
Location: Cedar Rapids, Iowa
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
IAwebdeveloper is an unknown quantity at this point
Do you have access to your Apache error log? It may shed some light on what is happening.
IAwebdeveloper is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 +1. The time now is 04:39 AM.


Advertisement
Log in to turn off these ads.