View previous topic :: View next topic |
Author |
Message |
cyberbat -
Joined: 20 Sep 2007 Posts: 2
|
Posted: Thu Sep 20, 2007 8:58 pm Post subject: Host in a rule |
|
|
Can I analyze host (aprelium.com e.g.), or protocol (http:// or https://) in a rule for rewrite creation? If I can than please say me how. Thanks. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Sep 20, 2007 11:35 pm Post subject: |
|
|
Only with X2 version; X1 can only manage a single host and does not allow the Host header in URL Rewriting. If you're running X2 version of Abyss, create a condition to check the Host header, and redirect it based on the URL Rewriting rule you created. Sorry but I currently don't have an example.
Alternatively, you could try Virtual Host Creator:
http://vhc.trustabyss.com |
|
Back to top |
|
|
cyberbat -
Joined: 20 Sep 2007 Posts: 2
|
Posted: Fri Sep 21, 2007 7:55 am Post subject: |
|
|
Ok. And what about protocol? How can I redirect from http to https in whole directory? |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Sep 21, 2007 7:33 pm Post subject: |
|
|
Add another condition to check the Protocol header (SERVER_PROTOCOL) or if you're running Abyss Web Server: X2, you can use the "Exclusively Serve on HTTPS" feature. |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Sep 29, 2007 2:24 am Post subject: Re: Host in a rule |
|
|
cyberbat wrote: | Can I analyze host (aprelium.com e.g.), or protocol (http:// or https://) in a rule for rewrite creation? If I can than please say me how. Thanks. |
You can determine in a rewrite rule the protocol that is used by checking the value of the HTTPS variable. It is set to "on" if your host is secure, otherwise its value is "off". _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|