httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Arnold <carn...@electrichendrix.com>
Subject [users@httpd] Trying to Rewrite Subdomain
Date Sat, 06 Apr 2013 23:07:41 GMT
Apache 2.2.12. I am trying to rewrite a subdomain like so:
http://sub.domain.com to http://sub.domain.com/"alias".
Here is the alias conf:

Alias /"alias" /path/to/root/directory
<Directory /path/to/root/directory>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    allow from all
    DirectoryIndex index.php
    php_admin_flag magic_quotes_gpc Off
</Directory>

I made a virtualhost file in vhost.conf directory like so:

<VirtualHost *:80>
    ServerName sub.domain.com

    RewriteCond %{HTTP_HOST} ^sub.domain.com [NC]
    RewriteCond %{REQUEST_URI} !^/"alias"/
    RewriteRule ^(.*) http://sub.domain.com/"alias"/ [L]

</VirtualHost>

When going to http://sub.domain.com, i get a 403:
[Sat Apr 06 18:44:34 2013] [error] [client ip] Directory index forbidden by Options directive:
/srv/www/htdocs/

First, are the rewrite rules correct for what i am trying to do? Second, should they be included
in the "alias" file to work?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message