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

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -