.htaccess with same index
-
04-12-2019 - |
Pregunta
I have this url: http://domain.com/?i=f
which is my forum page.
I wish to rewrite that to http://domain.com/forum
I do that like this:
RewriteRule ^forum ?i=f [L]
That works fine. But here comes the problem. Since it is a forum, it also have categories and topics. Therefore, I have this url: http://domain.com/?i=f&p=t&cid=ID
which is the categories page.
I wish to rewrite that to: http://domain.com/forum/cat/id
But if I do it like this:
RewriteRule ^forum/cat/([^/]*)$ /?i=f&p=t&cid=$1 [L]
It doesn't work. The URL /forum/cat/ID cannot be loaded.
What would the actual rule be to fix this?
Thanks.
Solución
Try to add $ at the end of forum rule Right now I have no apache installed
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow