Totally Zenned
- Join Date:
- Oct 2004
- Posts:
- 973
- Plugin Contributions:
- 0
How do I use htaccess to not rewrite a subdomain?
I have Zen-Cart installed in the public_html directory. I am upgrading it in the public_html/zen directory, I have it set up as a subdomain, so it should be zen.mysite.com.au. However, the htaccess file for the main site is causing the subdomain to redirect to the main site.
I have tried all kinds of additions to the htaccess file, but I can't find anything to stop the subdomain from redirecting. If I go to mysite.com.au/zen, it works fine, but if I go to zen.mysite.com.au, it redirects to mysite.com.au.
This is the htaccess file in the public_html directory:
RewriteEngine On
Don't rewrite any URIs ending with a file extension (ending with .[xxxx])
RewriteCond %{REQUEST_URI} !.[a-zA-Z]{2,4}$
Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/admin.* [NC]
Don't rewrite wordpress directory
RewriteCond %{REQUEST_URI} !^/blog.* [NC]
Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors.* [NC]
Don't rewrite cPanel directories
RewriteCond %{REQUEST_URI} !/cpanel.* [NC]
RewriteCond %{REQUEST_URI} !/frontend.* [NC]Don't rewrite new directory
RewriteCond %{REQUEST_URI} !^/new.* [NC]
Don't rewrite zen directory
RewriteCond %{REQUEST_URI} !^/zen.* [NC]
Handle all other URIs using Zen Cart (index.php)
RewriteRule (.*) index.php?%{QUERY_STRING} [L]
Can anyone tell me what I need to add to make the subdomain stop redirecting? Please note that this is for a .com.au URL.
Thanks!