Remove index.php from URL using mod_rewrite in Lighttpd

849 views Asked by At

I'm trying to remove the index.php from https://test.mysite.com.br/api/index.php/get/0/32342543 with no success.

I've tried:

url.rewrite-once = (
  "^/(test)(.*)” => “/$1$2",
  "^/(.*)$” => “/index.php/$1"
)

and also:

url.rewrite = (
    "^/(.*)\.(.+)$" => "$0",
    "^/(.+)/?$" => "/api/index.php/$1"
)

But both didn't work. What is the correct syntax for url.rewrite?

1

There are 1 answers

0
mate On

enable lighttpd module "mod_rewrite" in /etc/lighttpd/lighttpd.conf