0

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

John Topley
  • 113,588
  • 46
  • 195
  • 237
Max
  • 249
  • 2
  • 10

1 Answers1

1

Try this:

url.rewrite-once = (
    "^/[^?]*(\?(.*))?$" => "/index.php?$1&full_request=$0"
)
Gumbo
  • 643,351
  • 109
  • 780
  • 844