I could sure use a little help with what I am trying to do with a RewriteRule in .htaccess: ...to causes URLs using our sharpedge. subdomain to auto-load from the Internet_IE directory - one level deeper than the site root.
I have this in httpd.conf:
[snip] NameVirtualHost 11.22.33.44 <VirtualHost 11.22.33.44> Options All +ExecCGI ServerAdmin [email protected] DocumentRoot /var/www/html/ourdomain.com ServerName ourdomain.com ServerAlias www.ourdomain.com DirectoryIndex index.htm index.html index.dna #--------------------------------- <IfModule mod_rewrite.c> RewriteEngine on RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] </IfModule> #--------------------------------- </VirtualHost> <VirtualHost 11.22.33.44> Options All +ExecCGI ServerAdmin [email protected] DocumentRoot /var/www/html/ourdomain.com ServerName sharpedge.ourdomain.com DirectoryIndex index.htm index.html index.dna #--------------------------------- <IfModule mod_rewrite.c> RewriteEngine on RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] </IfModule> #--------------------------------- </VirtualHost> [snip] ...and this in .htaccess (in the site root, here: /var/www/html/ourdomain.com/)
Options -Indexes <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^sharpedge\.ourdomain\.com$ # years ago this next line was used here, but in httpd.conf: (I don't know what it was supposed to do) # RewriteRule ^(.+) %{HTTP_HOST}$1 [C] RewriteRule ^sharpedge\.ourdomain\.com(.*) /var/www/html/ourdomain.com/Internet_IE/$1 [L] </IfModule> ..but nothing happens from the RewriteRule; it is as if the RewriteRule was not there.
I'd much appreciate any suggestions.
Edits:
- I would've just changed the DocumentRoot to the directory I actually want to serve, but I need to be able to call (include) files from within files in that directory with a prefixing
/in the include path, where those files are located in the site root. Those files are also similarly called from other files that are in the site root.