Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-01-2008, 03:43 PM   #1
Barefootsies
Choice is an Illusion
 
Barefootsies's Avatar
 
Industry Role:
Join Date: Feb 2005
Location: Land of Obama
Posts: 42,635
SSL and Redirect

I've got an ssl cert installed for my domain example.com and I want all non-https requests to automatically go to the https. I've got it sorta working .. it redirects but gives me this error page:


Bad Request
Your browser sent a request that this server could not understand.

Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

Hint: https://example.com/

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Is there a right way to handle this?
__________________
Should You Email Your Members?

Link1 | Link2 | Link3

Enough Said.

"Would you rather live like a king for a year or like a prince forever?"
Barefootsies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-01-2008, 04:58 PM   #2
Barefootsies
Choice is an Illusion
 
Barefootsies's Avatar
 
Industry Role:
Join Date: Feb 2005
Location: Land of Obama
Posts: 42,635
bump for the answer
__________________
Should You Email Your Members?

Link1 | Link2 | Link3

Enough Said.

"Would you rather live like a king for a year or like a prince forever?"
Barefootsies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-01-2008, 05:00 PM   #3
baddog
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: the beach, SoCal
Posts: 107,089
How are you currently redirecting?
baddog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-01-2008, 05:02 PM   #4
baddog
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: the beach, SoCal
Posts: 107,089
Easiest way is to use mod_rewrite and place a .htaccess file in your public_html directory with the following

Code:
rewriteEngine On
rewriteCond %{SERVER_PORT}!443
rewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

at least, that is what my research shows
baddog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-01-2008, 05:10 PM   #5
riscphree
Confirmed User
 
Join Date: Aug 2006
Posts: 103
lulz word for word from my post on his forum
wiredwebonline.com/showthread.php?p=95#post95

Quote:
I've got an ssl cert installed for my domain example.com and I want all non-https requests to automatically go to the https. I've got it sorta working .. it redirects but gives me this error page:


Bad Request
Your browser sent a request that this server could not understand.

Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

Hint: example.com

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Is there a right way to handle this?
__________________
Need some help? PHP, SQL, JS, jQuery, Server Admin

http://riscit.info

TrafficLions ask for GFY special

Real SEO Traffic ask for GFY special

ICQ: 168-518-402
AIM: riscphree
Skype: riscphree
email: riscphree at gmail dot com
riscphree is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-01-2008, 05:42 PM   #6
netpimp
Registered User
 
netpimp's Avatar
 
Join Date: Jan 2005
Location: Phoenix, AZ
Posts: 66
An alternate method, though it won't carry your host arguments is just to drop it in a vhost. (mod_ssl config example), but you can at least use that to intercept 404 and such as well and send them back to the front. If your coding uses all relative files and/or any links are all https: you'll be fine.

Code:
<VirtualHost x.x.x.x:80> 
SSLEngine off
Port 80
ServerName some.server.name
Redirect / https://some.other.host
</VirtualHost>
netpimp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-01-2008, 05:48 PM   #7
Barefootsies
Choice is an Illusion
 
Barefootsies's Avatar
 
Industry Role:
Join Date: Feb 2005
Location: Land of Obama
Posts: 42,635
Quote:
Originally Posted by riscphree View Post
lulz word for word from my post on his forum
wiredwebonline.com/showthread.php?p=95#post95
Correct friend.

Was trying to get an answer for ya. I knew Baddog, among others, would know the answer to this fairly simply. Better to get the right answer, then give a theory.
__________________
Should You Email Your Members?

Link1 | Link2 | Link3

Enough Said.

"Would you rather live like a king for a year or like a prince forever?"

Last edited by Barefootsies; 02-01-2008 at 05:49 PM..
Barefootsies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.