Question

I am currently writing rules for my pages, with .htaccess.

I have a forum, the original URL of this is: ?i=f

This will then be rewritten to:

RewriteRule ^forum /?i=f [L]  

This works. Although here comes my problem. When I wish to go deeper into the pages, to the categories of the forum, the actual URL is: ?i=f&p=t&cid=ID

What I try to do is this rule:

RewriteRule ^forum/cat/([^/]*)$ /?i=f&p=t&cid=$1 [L]

Although that does not work, since the /forum is already defined. How can I do this?

Thanks.

Was it helpful?

Solution

Remove RewriteRule ^forum /?i=f [L] and add Just this rule:

RewriteRule ^forum(?:/cat/([^/]*))?$ /?i=f&p=t&cid=$1 [L]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top