0

Hello there,

I'm trying to create a rewrite condition for a set of rewrite rules. Currently this is what I have:

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 redirect http://www.mywebsite.com/PAGE1/PAGE2 to http://www.mywebsite.com/index.php?p=PAGE1&s=PAGE2, except when the URI starts with "forum" (for example http://www.mywebsite.com/forum). However, my rewrite condition is not working right now. Can anyone please help me?

Edited by minitauros: n/a

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by leakbali
0

Trying this:

RewriteCond %{HTTP_HOST} ^/?forum			[NC]
RewriteRule ^([\w]+)/([\w]+)/?$				index.php?p=$1&s=$2 [NC,L,C]
RewriteRule ^forum/?$					index.php?p=forum [NC,L]
RewriteRule ^([\w]+)/?$					index.php?p=$1 [NC,L]
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.