Hello Mod_rewrite Guru’s.
I am in need of some assistance.
My current mod-rewrite for subdomains is working excellently! However I need to add in some pagination and also some article viewing.
Here is what I currently have:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\\.domain\\.com [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\\.domain\\.com
RewriteRule (.*) index.php?c=%1 [L,QSA]
Now what I want to do is have mod_rewrite receive:
subdomin.domain.com/xx
as:
domain.com/?c=subdomain&p=xx
for my pagination.
Additionally if possible
I would also like to make it so I can view single articles from my blog. So if someone were to type in:
subdomain.domain.com/article/articlenumber/
it would be received as:
domain.com/?mode=article&article=articlenumber
Any help or pointers in the right direction would be amazing! Thanks for reading!