Home converting apache rewrite to nginx url rewrite
Reply: 0

converting apache rewrite to nginx url rewrite

Ananya Sharma
1#
Ananya Sharma Published in 2018-01-12 09:23:32Z

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.307486 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO