Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 28th, 2009, 08:16 AM
cbiweb cbiweb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 31 cbiweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 52 m 27 sec
Reputation Power: 7
401 on no-www domain only

I manage a tech support site, which has a mirrored private site for testing & development on the same server, and is protected by .htaccess

A few days ago I added following to .htaccess at the root level, to redirect everything on the domain from http:// to http://www

Code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^sitename\.com$ [NC]
RewriteRule ^(.*)$ http://www.sitename.com/$1 [R=301,L]


That worked perfectly for the public site; typing http://sitename.com will bring me to http://www.sitename.com. But when I type the http:// URL for the testbed, it throws this at me:

Code:
/401.shtml File not found, sorry. 404


If I type http://www, then it works fine. But that's not desirable, as I expected it would behave the same as the public site, which redirects with no problem.

Why does that happen for the testbed but not the public site, and how do I fix it?

Thanks in advance for any help.

Reply With Quote
  #2  
Old September 1st, 2009, 07:21 PM
cbiweb cbiweb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 31 cbiweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 52 m 27 sec
Reputation Power: 7
Please? I really need help with this.

Reply With Quote
  #3  
Old September 5th, 2009, 08:27 PM
cbiweb cbiweb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 31 cbiweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 52 m 27 sec
Reputation Power: 7
Hello??

Reply With Quote
  #4  
Old September 15th, 2009, 09:15 AM
cbiweb cbiweb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 31 cbiweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 52 m 27 sec
Reputation Power: 7
bump because I REALLY need an answer.

Reply With Quote
  #5  
Old September 26th, 2009, 09:21 AM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,382 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 20 h 31 m 48 sec
Reputation Power: 4080
What does the testbed URL look like? This is very important.

Code:
RewriteCond %{HTTP_HOST} ^sitename\.com$ [NC]
RewriteRule ^(.*)$ http://www.sitename.com/$1 [R=301,L]

Do you understand regular expressions or did you just copy this from somewhere? By the way, you really should have posted this in the apache forum, which is why you never got any help so far.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > 401 on no-www domain only

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap