views:

49

answers:

1

Hi all, i need an regex to do the following:

  • redirect EVERY request to the index.php
  • if there are get parameters in the url i need to access them with $_GET[] (php)

My (not complete) solution is:

url.rewrite-once = (
   ".*\?(.*)$" => "/index.php?$1&full_request=$0"
)

But the error here is that if there's not an "?" in the url i get an "404 not found".

Thanks in advance for help, dexcs

+1  A: 

Try this:

url.rewrite-once = (
    "^/[^?]*(\?(.*))?$" => "/index.php?$1&full_request=$0"
)
Gumbo