Max
Max

Reputation: 249

lighttpd mod_rewrite all

i need an regex to do the following:

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

Upvotes: 0

Views: 1380

Answers (1)

Gumbo
Gumbo

Reputation: 655139

Try this:

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

Upvotes: 1

Related Questions