We have a Drupal 6.0 site with a very long URL (eg. http://examplesite.com/purdue/drupal). We decided to purchase a Domain Name www.perdue.org from GoDaddy. So the idea is for people to go to www.perdue.org and it will do a URL Forwarding and Masking to http://examplesite.com/purdue/drupal. But people will always see www.perdue.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! I'm getting a 500 Error on all other directories.

<VirtualHost *:80>
    ServerAdmin root@localhost
    ServerName  perdue.org
    AliasMatch ^/site/\w+/(.*) /var/www/html/purdue/drupal/$1
    DocumentRoot /var/www/html/purdue/drupal
</VirtualHost>

How can I fix this?

If I were to do this on the .htaccess file how can I achieve this URL Forwarding and Masking thing??

Can anyone help?!

Thanks a bunch.

Ceci

Comments

mrtoner’s picture

I have to ask: "Why?"

You should be able to point the domain name to the specific Drupal installation directory. If this were a cPanel hosting account, I'd add an add-on domain with /perdue/drupal as the document root. No forwarding or masking needed.

aireworth’s picture

Does this not work?

<VirtualHost *:80>
    ServerAdmin root@localhost
    ServerName  perdue.org
    ServerAlias www.perdue.org
    DocumentRoot /var/www/html/purdue/drupal

</VirtualHost>

Colin

ceci123’s picture

The code above it seem to work(at least now I can see the drupal install with perdue.org on URL)...however, I run into two problems:

1) I am unable to login. It can't find the drupal admin pages. I think I need to mess with the setting.php file for this issue.

2) When I tried accessing the other directories(eg /var/www/html/site1, /var/www/html/site2,...ect) on the Unix server I get a "Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. "
. Removing the code return things to normal. How I can get around this issue?

Thanks

Ceci