Hello there,
I'm trying to create a rewrite condition for a set of rewrite rules. Currently this is what I have:
HTML and CSS Syntax (Toggle Plain Text)
RewriteCond %{HTTP_HOST} ^/?forum [NC]
RewriteRule ^([\w]+)/([\w]+)/?$ index.php?p=$1&s=$2 [NC,L,C]
RewriteRule ^([\w]+)/?$ index.php?p=$1 [NC,L]
What I want is to have the following uri, http://www.mywebsite.com/page1/page2, load a different page, http://www.mywebsite.com/index.php?p=page1&s=page2, by using mod rewrite.
Except when the query part starts with "forum" (for example: http://www.mywebsite.com/forum). When it does start with forum, I would like to really load the "forum" folder, instead of loading index.php?p=forum. However, my rewrite condition is not working right now. Can anyone please help me?