Host in a rule

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
cyberbat
-


Joined: 20 Sep 2007
Posts: 2

PostPosted: Thu Sep 20, 2007 8:58 pm    Post subject: Host in a rule Reply with quote

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 View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Sep 20, 2007 11:35 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
cyberbat
-


Joined: 20 Sep 2007
Posts: 2

PostPosted: Fri Sep 21, 2007 7:55 am    Post subject: Reply with quote

Ok. And what about protocol? How can I redirect from http to https in whole directory?
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Sep 21, 2007 7:33 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Sat Sep 22, 2007 1:35 am    Post subject: Re: Host in a rule Reply with quote

cyberbat wrote:
Ok. And what about protocol? How can I redirect from http to https in whole directory?


TMTOWTDI :)

Yes. You want http://your-site.com/directory/ to be redirected to https://your-site.com/directory/

Regex: ^/directory/(*)
Ext. Redirection to: https://your-site.com/directory/$1

Do this URL rewriting for the host on port 80.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Sep 29, 2007 2:24 am    Post subject: Re: Host in a rule Reply with quote

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 View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group