i'm converting htaccess file htaccess file
to nginx using
http://winginx.com/ru/htaccess
but don't understand should paste result. have created include file
include /etc/nginx/myfile
and pasted file there when i'm reloading (restarting) nginx fails.
could me?
i suspect these apache .htaccess converters not utilize unique features of nginx. recommend trying this:
server { listen 80 default_server; server_name _; root /var/www/example.com; index index.php; # if file or directory doesn't exist, serve /index.php try_files $uri $uri/ /index.php; # if request /sitemax.xml, serve sitemap_xml.php location = /sitemax.xml { try_files /modules/sitemap/sitemap_xml.php =404; } # hide regex location in prefix location avoid confusion # introduced multiple regex locations location /pages-print { location ~ ^/pages-print(\d+) { try_files /modules/pages/print.php?page=$1 =404; } } }
Comments
Post a Comment