• Home
  • Download
  • Links
  • Photoplog
  • Blowfish Secret
  • Base64
  • Wordpress Salt
  • Contact
  • ROM
  • Skins
  • VIP
  • Tutorial
Wckediden - Mobile Tricks and Tweaks Community  

Go Back   Wckediden - Mobile Tricks and Tweaks Community > Community Software > Webmaster Software (Windows System Only 64bit) > Apache Server
Reload this Page [INFO] RedirectSSL
Wckediden
Register Forum Rules FAQ Community Today's Posts Search

Notices
Under Construction

WckedIDen Forum Renovations

WckedIDen is currently undergoing forum structure renovations. During this process, you may experience intermittent errors, unavailable pages, or temporary service interruptions.

Please be patient while we work to improve the forum. We appreciate your understanding and continued support.


Community Links
Social Groups
Pictures & Albums
Members List
Meet Our Staff
Search Forums
 
Tag Search
Advanced Search
Search Downloads
Advanced Search
Search Links
Advanced Search
Find All Thanked Posts



Post New ThreadReply
 
Thread Tools Search this Thread
  #1  
Old 07-13-2024, 01:32 AM
wcked's Avatar
wcked wcked is offline   Thread Starter  
Supporter/Designer
Mobile Model: Google Pixel 10 Pro
Mobile Carrier: Metro PCS
Mobile OS: Android

  usa
 
Join Date: November 8th, 2005
Location: North Philadelphia
Posts: 10,398
Downloads: 18
Uploads: 181
wcked has disabled reputation


View wcked's Profile   Edit Options Edit Profile Picture View wcked's Photo Album Add wcked's to Your Contacts Show Groups Edit Avatar Subscribed Threads Private Messages
Default 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 *:80
<VirtualHost *:80>
ServerName mysite.example.com
DocumentRoot /usr/local/apache2/htdocs
Redirect /secure https://mysite.example.com/secure
</VirtualHost>

<VirtualHost _default_:443>
ServerName mysite.example.com
DocumentRoot /usr/local/apache2/htdocs
SSLEngine On
# etc...
</VirtualHost>
When redirecting everything you don't even need a DocumentRoot:

Code

NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.example.com
Redirect / https://secure.example.com/
</VirtualHost>

<VirtualHost _default_:443>
ServerName secure.example.com
DocumentRoot /usr/local/apache2/htdocs
SSLEngine On
# etc...
</VirtualHost>


Note: 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/login
[HEADING=1]Using mod_rewrite[/HEADING]
While 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ÃÃâ€*’¢ÃƆ™Ãƒâ€šÃ‚¢ÃƒÂ¢Ã¢â€šÂ¬Ã…¡Ãâ₠¬Å¡Ãƒâ€šÃ‚¬ÃƒÆ’¢ââ€à …¡Ã‚¬Ã‚¹

Reply With Quote
wcked
View Public Profile
Visit wcked's homepage!
Find all posts by wcked
Post New ThreadReply

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Thread Tools
Show Printable Version Show Printable Version
Search this Thread

Advanced Search
Donate Via PayPal
Amount:
Enter Short Message:
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

Forum Rules


All times are GMT -4. The time now is 04:49 AM.

Wckediden Community - Archive - Privacy Statement - Terms of Service - Top


Powered by vBulletin® Version 3.8.14
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Template-Modifications by TMS
POWERED BY PHILLYFINESTSERVERSTAT FOR WCKEDIDEN|- NEXTELELITE| - PPCTHEME| - IDENINSIDER