- Code: Select all
<IfModule mod_php4.c>
php_value session.use_trans_sid 0
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+) index.php?category=$1&title=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1 articlespage=$2 [L]
Baiscally, index.php?category=$1&title=$2&commentspage=$3
is translated into: /category/title/commentspage/
My server is already setup to recognize the subdomains. But currently the above .htaccess code won't allow it. Is there someway that it can be modified to display the same dynamically displayed content as both:
www.domain.com/category/ and category.domain.com?
Any articles under the category would be:
category.domain.com/article/
or
category.domain.com/title/
or
category.domain.com/title/commentspage/
Also, if it could be told to exclude making the 'home' category a subdomain, that would be awesome.