Nginx rewrite for folder -
i'm having problem rewrite rule in nginx
here have:
location / { rewrite ^/([a-za-z0-9\-\_]+)$ /index.php?p=$1; }
i have folder named example
in html folder nginx. want take variables , put them behind url folders.
basically need
www.example.com/example/index.php?p=something&var=something2
to like
www.example.com/something/something2
any great. i'm switching apache nginx , it's bit confusing.
try this:
rewrite ^/([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)$ /example/index.php?p=$1&var=$2;
Comments
Post a Comment