This is a discussion on mod_rewrite URL and SEO within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi!! I was searching answer for ma question everywhere but I couldn't find it, so please HELP ME. I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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} !^www\.sub\.domain\.com$ RewriteCond %{HTTP_HOST} ^(.*)sub\.domain\.com$ RewriteRule ^site/([0-9]+)$ http://sub.domain.com/index.php?section=$1 [L] but this code doesn't work. Please help me, what's wrong whith this code? Thanks in advance, Barcin |
|
|||
|
|
| Thread Tools | |
| Display Modes | |
|
|