url rewriting to a new server (port)

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


Joined: 17 Aug 2002
Posts: 66

PostPosted: Thu May 17, 2007 12:17 pm    Post subject: url rewriting to a new server (port) Reply with quote

could i use url rewriting to redirect the user to another server running on another port somehow? (at the end everything must run over port 80).

so i want to redirect /instiki to http://mydomain:2500

tia
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: Fri May 18, 2007 4:56 pm    Post subject: Reply with quote

Very simple to do.

Virtual path regex: ^/instiki/(.*)
Uncheck case sensitivity

If rule matches, perform external redirection
redirect to: http://mydomain.com:2500/$1

Restart server, and you're done!

BTW, URL rewriting is useful for security as well. For instance, if only letters should go after /instiki, use ^/instiki/([a-zA-Z]+) --- or only numbers ^/instiki/([0-9]+)
_________________
Stephen
Need a LitlURL?


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


Joined: 17 Aug 2002
Posts: 66

PostPosted: Sat May 19, 2007 1:09 pm    Post subject: Reply with quote

i could get a redirection to a new url (but iam still serving via port 2500), but thats it..., any other ideas?
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu May 24, 2007 5:49 pm    Post subject: Re: url rewriting to a new server (port) Reply with quote

smok3,

The suggestion above seems fine. What kind of problem are you having with it?

By the way, do you want to serve Instiki directly from Abyss Web Server without using the simple server that comes bundled with it?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
smok3
-


Joined: 17 Aug 2002
Posts: 66

PostPosted: Tue Jul 17, 2007 8:31 pm    Post subject: Reply with quote

Quote:
By the way, do you want to serve Instiki directly from Abyss Web Server without using the simple server that comes bundled with it?

any solution will be fine, as long as my port stays 80.
(iam using x1 so i cant run multiple hosts)

p.s. sorry, took me awhile to get back to this topic...
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jul 17, 2007 9:47 pm    Post subject: Reply with quote

smok3,

Please find below the required configuration instructions. We'll assume that you're going to start with a fresh host (or reset the only host you have if you're on X1):

* Install Ruby on Rails preconfigured package http://www.aprelium.com/abyssws/ror.html in C:\Ruby
* Uncompress Instiki in c:\instiki-0.11.0

* Copy the file c:\instiki-0.11.0\lib\native\win32\sqlite3.dll inside c:\Ruby\bin
* Copy the file c:\instiki-0.11.0\lib\native\win32\sqlite3_api.so inside c:\Ruby\lib\ruby\site_ruby\i386-msvcrt\

* Go to "Scripting Parameters"
* Add an interpreter which "Interface" is "FastCGI (Local/Pipes)", path is "C:\Ruby\bin\rubyw.exe", "Arguments" is "c:\\pmhc\instiki-0.11.0\\public\\dispatch.fcgi".
* Associate the interpreter with the extension fcgi.
* Add a custom environment variable which name is RAILS_ENV and which value is production

* Add a URL Rewriting rule as follows:
- Virtual Path Regular Expression: ^(.*)$
- Conditions:
Condition 1:
Variable: REQUEST_FILENAME
Operator: Is not a file
- Perform an Internal redirection
- Redirect to: /dispatch.fcgi?$1

* Restart the server
_________________
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