Search Results

Search found 1 results on 1 pages for 'user1692328'.

Page 1/1 | 1 

  • Rewrite to support folders as domain aliases while hiding subfolders

    - by user1692328
    I am trying to use domain aliases to point to subfolders on my site where the subfolders name would be hidden from resulting url on rewrite. domain-alias1.com and domain-alias2.com are domain aliases to domain.com I have the following in my root: domain.com/ .htaccess (listed below) domain-alias1/ main/ .htaccess (contains only Options -Indexes) domain-alias2/ ... /.htaccess follows: RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^domain-alias1\.com$ [NC,OR] RewriteCond %{HTTP_HOST} ^www\.domain-alias1\.com$ [NC] RewriteCond %{REQUEST_URI} !^/domain-alias1 RewriteRule ^(.*)$ domain-alias1/$1 [L] RewriteCond %{HTTP_HOST} ^domain-alias2\.com$ [NC,OR] RewriteCond %{HTTP_HOST} ^www\.domain-alias2\.com$ [NC] RewriteCond %{REQUEST_URI} !^/domain-alias2 RewriteRule ^(.*)$ domain-alias2/$1 [L] domain-alias1.com (yields) - Forbidden. You don't have permission to access /cogeco-gis/ on this server. (Which is what I want since .htaccess in domain.com/domain-alias1 contains Options -Indexes) domain-alias1.com/test (yields) - Not Found. The requested URL /domain-alias1/test was not found on this server. (Which is what I expect since test does not exist) domain-alias1.com/main (yields) - domain-alias1.com/domain-alias1/main/login_page.php I am expecting rewrite to yield : domain-alias1.com/main/login_page.php where subfolder domain-alias1 is hidden from resulting url) Any help on how to get expected results?

    Read the article

1