0

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?

Edited by minitauros: n/a

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by vibhaJ
0

I now have:

RewriteCond %{REQUEST_URI} forum
RewriteRule .* /forum [NC,R,L]

This works for the url http://mywebsite.com/forum, but when I try to load an image named "forum", it won't load. It does load, however, when I rename it to "forun", so it's definately a problem in my .htaccess. How can I fix this?

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.