![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Posts: 1,021
|
.htaccess question
I am hoping someone can help with this issue. I need to force www and https on my site and I am using the following code in my .htaccess file:
RewriteEngine On RewriteCond %{HTTP_HOST} !="" RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTPS}s ^on(s)| RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Everything works fine when typing the domain directly but when linking deep within the site it only redirects to www and not https as well. So typing h ttp://domain redirects to h ttps://www.domain.com but when typing h ttp://domain.com/anything redirects to h ttp://www.domain.com/anything.
__________________
Email: fenris_wolf3000 (a t ) yah00 . c 0 m ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,232
|
See if this works
RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Industry Role:
Join Date: Nov 2005
Posts: 1,021
|
Quote:
__________________
Email: fenris_wolf3000 (a t ) yah00 . c 0 m ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |