Virtual host Alias not routing properly

Posted by Jacob on Server Fault See other posts from Server Fault or by Jacob
Published on 2014-06-12T20:00:32Z Indexed on 2014/06/12 21:27 UTC
Read the original article Hit count: 128

I apologize if this question has been asked many times in the past. I am not 100% sure of the exact cause of my issue and am out of google magic right now.

Basically I have a virtual host file setup with an Alias record that points to a different directory other the document root. It basically looks like this

<VirtualHost *:80>
    ServerName                        iBusinessCentral.com
    ServerAdmin                       [email protected]
    DocumentRoot                      /var/www/marketingsites/
    ServerAlias                       iBusinessCentral.com *.iBusinessCentral.com
    Alias                             /unsub "/var/www/unsub/site_index/"
</VirtualHost>

When I navigate to ibusinesscentral.com/unsub/?randomquerystring I am directed to the correct folder.

If I remove the query string and navigate to ibusinesscentral.com/unsub/ I am taken to the directory in the document root. The unsub directory is a zend application and I need to be able to navigate to different url paths like ibusinesscentral.com/unsub/unenroll?querystring

I have tried using AliasMatch instead of Alias. I have also tried adding a slash after the unsub portion of the Alias record, and have not had any luck to this point.

Thanks in advance for any assistance

© Server Fault or respective owner

Related posts about centos

Related posts about virtualhost