Forum Moderators: phranque
I am struggling with this one. I am building a CMS and I want the entire contents of the URL put into a variable to be parsed by a PHP page and the correct content displayed. I am putting the rewrite engine in a directory called content. I have worked out this so far:
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^([^.]+)$ /content/index.php?url=$1 [L]
Now the above works for all pages like:
www.domain.com/content/help/faq/first_set/
I will get url=help/faq/first_set/
but if I have a url
www.domain.com/content/help/faq/first_set/?section=2
I will not get the?section=2 put in the url parameter. I will get the same result.
Ideally I would like the url to go in one parameter and anything after the? to go in another parameter, but all in the same parameter would be fine.