Board index   FAQ   Search  
Register  Login
Board index System Administration Server installation and configuration

web protocol redirection

Discuss server installationa nd configuration issues here

Moderators: macek, egami, gesf

web protocol redirection

Postby slamp » Sun Jul 31, 2005 3:07 pm

hi guys,

I know this is not the place to ask this question but who else knows about this better than people that actually runs their own server.

is there a way to redirect http://www.sitename.com to
https://www.sitename.com even before hitting the actual web server?

i know this can be done using:

mod_rewrite

or

<?php header("Location:https://www.sitename.com"); ?>

or

a metarefresh equivalent for html.

problem is optimum online blocks port 80 so the above will not work. i
dont know if there is any other way to do this maybe in DNS?

thanks for any input.
slamp
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Mar 15, 2005 8:29 pm

Postby gesf » Sun Jul 31, 2005 3:58 pm

Topic moved to Free time.

Yes, you can make it using Apache and mod_rewrite:
Code: Select all
RewriteEngine on
RewriteBase   /usr/local/website
RewriteCond   %{SERVER_PORT}  !^443$
RewriteRule   ^(.*)?$   https://%{SERVER_NAME}/$1 [L,R]
With this code any http (80) request to the server will be forwarded to https (443).

Another alternative for the 3rd line could be:
Code: Select all
RewriteCond %{HTTPS} !^on$
Just a better proof for the https.
User avatar
gesf
Moderator
Moderator
 
Posts: 1718
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden

Postby Alexej Kubarev » Tue Aug 02, 2005 10:25 am

Topic moved to server configuration instead :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby gesf » Tue Aug 02, 2005 10:41 am

Thanks Alexei. Also i've moved it to free time :)
User avatar
gesf
Moderator
Moderator
 
Posts: 1718
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden

Postby Alexej Kubarev » Tue Aug 02, 2005 10:53 am

i saw that: but its place is in Server configuration. but it was locked by the time of posting. now i repened the forum and therefore moved it here :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Re: web protocol redirection

Postby smith3134 » Fri Aug 06, 2010 11:54 pm

The Web Protocol allows to use a Cisco Cache Engine to handle web traffic, thus reducing transmission costs and downloading time. This traffic includes user requests to view pages and graphics on World Wide Web servers, whether internal or external to your network, and the replies to those requests.
smith3134
New php-forum User
New php-forum User
 
Posts: 1
Joined: Fri Aug 06, 2010 11:33 pm


Return to Server installation and configuration

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.