Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Old 09-05-2008, 06:05 PM .htaccess https help
Junior Talker

Posts: 3
Location: Chicago, IL
Trades: 0
Due to our SSL cert only being for our https://domain.com

when someone goes to https://www.domain.com

they get an aweful error in the browser

so, I want to forward: https://www.domain.com to https://domain.com

so I have tried multi configurations in the htaccess file and non have worked.




#hpps-rewite
RewriteCond %{HTTPS_HOST} ^www.midwestapplianceparts.com
RewriteRule (.*) https://midwestapplianceparts.com [R=301,L]

also this:

RewriteCond %{HTTPS_HOST} !^www.midwestapplianceparts.com
RewriteRule ^(.*)$ http://www.midwestapplianceparts.com/$1 [r=301,L]

and the browser says:

Redirect Loop

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Please, any help would be awesome!
monkfunk is offline
Reply With Quote
View Public Profile Visit monkfunk's homepage!
 
 
Register now for full access!
Old 09-06-2008, 11:23 AM Re: .htaccess https help
Ultra Talker

Posts: 251
Location: Belgium, Antwerp, Zoersel
Trades: 0
Well, as the browser says, it's a redirect loop.

When someone goed to https://www.midwestapplianceparts.com, het gets redirected to https://midwestapplianceparts.com, but because of the second rule, he gets re-redirected to http://www.midwestapplianceparts.com . The L which normally prevents this from happening won't work because of the R=301.

Try using just:

Code:
RewriteCond %{HTTPS_HOST} ^www\.midwestapplianceparts\.com
RewriteRule ^(.*)$ https://midwestapplianceparts.com/$1 [R=301,L]
The backslashes are there because dots are special characters in regular expressions, which are used in the RewriteCond.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Orodreth is offline
Reply With Quote
View Public Profile Visit Orodreth's homepage!
 
Old 09-10-2008, 03:14 PM Re: .htaccess https help
Average Talker

Posts: 25
Name: Will
Trades: 0
This may be because essentially www and no www are actually the same place.

In the DNS, www is already pointed to the non-www location, essentially its a redirect in itself.

So when you go in and then post another redirect rule, it creates an infinite loop of sorts.
__________________

Please login or register to view this content. Registration is FREE
- webcs.com

Please login or register to view this content. Registration is FREE

management and hosting since 1996
webcs is offline
Reply With Quote
View Public Profile Visit webcs's homepage!
 
Reply     « Reply to .htaccess https help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25903 seconds with 12 queries