![]() |
RedirectSSL
[HEADING=1]Using virtual hosts (using redirect)[/HEADING]
When using SSL, you will frequently have at least two virtual hosts: one on port 80 to serve ordinary requests, and one on port 443 to serve SSL. If you wish to redirect users from the non-secure site to the SSL site, you can use an ordinary Redirect directive inside the non-secure VirtualHost: Note: The NameVirtualHost directive only applies to the 2.2.x releases of httpd. Code:
NameVirtualHost *:80Code:
NameVirtualHost *:80Note: Once the configuration is working as intended, a permanent redirection can be considered. This avoids caching issues by most browsers while testing. The directive would then become: Redirect permanent / https://secure.example.com/ Using .htaccess files and redirect Redirect can also be used inside .htaccess files or to address particular URLs, as in: Example: Code:
Redirect /login https://mysite.example.com/loginWhile the <VirtualHost> solution is recommended because it is simpler and safer, you can also use mod_rewrite to get the same effect as described here: RewriteHTTPToHTTPSÃÃâ€*’¢ÃƆ™Ãƒâ€šÃ‚¢ÃƒÂ¢Ã¢â€šÂ¬Ã…¡Ãâ₠¬Å¡Ãƒâ€šÃ‚¬ÃƒÆ’¢ââ€à …¡Ã‚¬Ã‚¹ |
| All times are GMT -4. The time now is 03:12 AM. |
Powered by vBulletin® Version 3.8.14
Copyright ©2000 - 2026, vBulletin Solutions Inc.
POWERED BY PHILLYFINESTSERVERSTAT FOR WCKEDIDEN|- NEXTELELITE| - PPCTHEME| - IDENINSIDER