Hi!!
I was searching answer for ma question everywhere but I couldn't find it, so please HELP ME.
I have a hosted server. I have one main domain. There is some website under this domain. i'm using mod_rewrite to have SEO URL's so insted domain.com/index.php?section=5 I have domain.com/site/1. All mod_rewrite rules are in .htaccess file.
Using cPanel I've created subdomain sub.domain.com. There is a different website under this domain, but i want to have also SEO URL's, (sub.domain.com/site/2 goes to sub.domain.com/section.php?section=2) so I added this code to .htaccess file in main directory:
Code:
RewriteCond %{HTTP_HOST} !^ RewriteCond %{HTTP_HOST} ^(.*)sub\.domain\.com$
RewriteRule ^site/([0-9]+)$ [L]
but this code doesn't work. Please help me, what's wrong whith this code?
Thanks in advance,
Barcin
I was searching answer for ma question everywhere but I couldn't find it, so please HELP ME.
I have a hosted server. I have one main domain. There is some website under this domain. i'm using mod_rewrite to have SEO URL's so insted domain.com/index.php?section=5 I have domain.com/site/1. All mod_rewrite rules are in .htaccess file.
Using cPanel I've created subdomain sub.domain.com. There is a different website under this domain, but i want to have also SEO URL's, (sub.domain.com/site/2 goes to sub.domain.com/section.php?section=2) so I added this code to .htaccess file in main directory:
Code:
RewriteCond %{HTTP_HOST} !^ RewriteCond %{HTTP_HOST} ^(.*)sub\.domain\.com$
RewriteRule ^site/([0-9]+)$ [L]
but this code doesn't work. Please help me, what's wrong whith this code?
Thanks in advance,
Barcin