Redirect one URL to another URL

From Kolmisoft Wiki
Jump to navigationJump to search

General

Imagine that you have the domain http://www.server1.com/ and a Reseller with Custom Reseller Login page.

Reseller's URL has the following format: http://www.server1.com/billing/callc/login/qg2audn8qa.

Let's say you want to add the Reseller's name at the end of URL like:

http://www.server1.com/Reseller1

and that should actually be forwarded to:

http://www.server1.com/billing/callc/login/qg2audn8qa

Configuration

Edit file:

/etc/httpd/conf/httpd.conf 

Find line:

# Redirect permanent /foo http://www.example.com/bar

Add the following line below:

Redirect /Reseller1 http://www.server1.com/billing/callc/login/qg2audn8qa

See example below:

Apache redirect.png

Restart apache to apply changes:

service httpd restart

See also