|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Turning HTTP calls into HTTPS connections??
How do I redirect an HTTP call on a page to an HTTPS connection?
Right now, a user can establish a connection on my web page through either port 80 or port 443. So: http://www.something.com/dir/ and https://www.something.com/dir/ both work. What I want is when a client looks for http://www.something.com/dir/ they get redirected to https://www.something.com/dir/ I tried: Redirect /dir https://www.something.com/dir But that didn't work. Any help would be mucho appreciated. thanks, e |
|
#2
|
|||
|
|||
|
Do you want just /dir or the entire site? If just /dir, how many dir?
|
|
#3
|
|||
|
|||
|
Just /dir and any files within that directory.
thanks, e |
|
#4
|
|||
|
|||
|
Put the following within your port 80's www.something.com <VirtualHost>.
For example: NameVirtualHost * <VirtualHost *> DocumentRoot "/www/htdocs" ServerName www.something.com RewriteEngine on RewriteCond %{REQUEST_URI} ^/dir(.*) RewriteRule ^/icons/(.+) - [PT,L] RewriteRule ^/dir(.*) https://www.something.com/dir$1 [R,L] </VirtualHost> <VirtualHost *> ... another domain here ... </VirtualHost> <VirtualHost _default_:443> ... ... </VirtualHost> |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Turning HTTP calls into HTTPS connections?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|