![]() |
HTTPS redirect
I'm trying to redirect all HTTP traffic to HTTPS. The following within .htaccess works to a point. if abc.com is typed in, the URL correctly converts to https://www.abc.com/vb4/. It does not work when an http link is provided. http://www.abc.com/vb4/showthread.php/123-post comes back as https://www.abc.com/showthread.php/123-post. Note that the vb4 directory is stripped from the URL which results in a 404. Thanks in advance for any assistance.
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://www.abc.com/$1 [R=301,L] |
The htaccess rules you posted should work fine.
What happens when you disable those htaccess rules? Does it still happen or does it go to default behavior? |
You could try changing (.*) to ^(.*)$, but I dont see why it would fail, unless maybe you have a RewriteBase messing things up in there somewhere.
|
Quote:
This was given for my use from server support. --------------------------------------------------------------------- RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] --------------------------------------------------------------------- :) |
Best one for me is:
RewriteEngine On RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule ^(.*)$ https://%1/$1 [R=301,L] |
Wow, this RewriteCond %{HTTPS} on
is absolute different than mine. Why so difference? Do we know what "on" means? |
All times are GMT. The time now is 11:40 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|