0

i have to change my htaccess to nginx, but not working. help me change this code in the correct nginx format.

RewriteRule ^(.+).html$ yt-search.php?q=$1
RewriteRule ^query$ search-query.php [L,QSA]
RewriteRule ^download-mp3/(.+)~(.+)$ yt-single.php?title=$1&id=$2 [L,QSA]
RewriteRule ^loading-mp3/(.+)$ redirect-download.php?id=$1 [L,QSA]
RewriteRule ^create-post$ create-post.php [L,QSA]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
  • Possible duplicate of [How can I use .htaccess file in nginx](https://stackoverflow.com/questions/35766676/how-can-i-use-htaccess-file-in-nginx) – tshimkus Mar 09 '19 at 01:29
  • .htaccess is a directive for apache servers and will not work on nginx. Check out the documentation for nginx rewrite module: http://nginx.org/en/docs/http/ngx_http_rewrite_module.html – tshimkus Mar 09 '19 at 01:33

0 Answers0