LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-22-2011, 01:33 PM   #1
ceci2
Member
 
Registered: Dec 2004
Posts: 40

Rep: Reputation: 15
URL Forwarding and Masking


We want to mask the URL displayed on the ADDRESS BAR. For example say.. I want to redirect the domain name ABC.COM to say XYZ.COM but I want to show the URL ABC.COM on the ADDRESS BAR instead of XYZ.COM.

Here are the actual details. We have a very long URL (eg. http://example.site.com/purdue/sales). We decided to purchase a Domain Name www.sales.org from a hosting site so the idea is for people to go to www.sales.org and it will do a URL Forwarding and Masking to http://example.site.com/purdue/sales. But people will always see www.sales.org on their URL.

We have tried adding the code below on the /etc/httpd/conf file where the VirtualHost directive resides but its affecting every directory on the site returning 500 Error. I am not well versed in dealing with apache configuration but I am guessing the '*' is causing the problem.

Code:
<VirtualHost *:80>
    ServerAdmin root@localhost
    ServerName  sales.org
    DocumentRoot /var/www/html/purdue/sales
</VirtualHost>
How can I modify this so it only affects the indicated site or directory above?
Can anyone help?
Thanks

Last edited by ceci2; 12-22-2011 at 01:35 PM.
 
Old 12-22-2011, 04:40 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,894

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Hi,

You can look at error_log to find out why you get the 500 error
Your vhost config looks good. Assuming that both sales.org and www.sales.org resolving to the IP of your apache server, you can add a:
Code:
ServerAlias www.sales.org
so www.sales.org works too.

Quote:
I am not well versed in dealing with apache configuration but I am guessing the '*' is causing the problem.
If you have a
Code:
NameVirtualHost *:80
then the asterisk "*" is correct

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid ACL to allow access to a child URL below a blocked main URL soslinux Linux - Server 1 10-13-2011 02:47 AM
.htaccess domain / url forwarding max_tcs Linux - Software 1 12-17-2007 10:40 AM
forwarding url to local IP helot Linux - Networking 4 01-02-2005 08:53 AM
URL Forwarding MikeyCarter General 1 10-14-2003 10:44 AM
URL Redirect (with Masking) BxBoy General 0 03-11-2003 09:44 PM


All times are GMT -5. The time now is 06:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration