I'm new to Nginx, how can I rewrite this mod_rewrite, so that will work in Nginx?
RewriteEngine On
RewriteRule (.*) index.php
I tried this, but it didn't work.
location / {
(...)
reqrite (.*) /index.php last;
}
Thanks!
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityTry:
location / {
rewrite ^(.*)$ /index.php last;
}
last
instead of break
to allow the php location to still redirect the code to the php (f)cgi.
Jan 26, 2016 at 20:05
reqrite
a typo or is it what you are trying? It should berewrite
.