Home converting apache rewrite to nginx url rewrite
Reply: 0

converting apache rewrite to nginx url rewrite

user623
1#
user623 Published in May 20, 2018, 10:16 am

can anybody help me to convert .htacess file to nginx rewrite rule my htaccess blew

RewriteEngine On
RewriteRule ^video/([^/]*)/([^/]*)\/$ /index.php?page=details&title=$1&id=$2 [L]
RewriteRule ^video/([^/]*)\.html$ /index.php?page=result&q=$1 [L]

i try apply on here: /etc/nginx/sites-available/default

# nginx configuration

location /video {
  rewrite ^/video/([^/]*)/([^/]*)\/$ /index.php?page=details&title=$1&id=$2 break;
  rewrite ^/video/([^/]*)\.html$ /index.php?page=result&q=$1 break;
}

not working..

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.306935 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO