pdc
1
Hello
previously I used the web with apache htaccess…
how to change it so it can be used in nginx hestiacp?
below is my htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^robots.txt _robots.php [L]
RewriteRule ^sitemap-post.xml _sitemap.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
sahsanu
2
That .htaccess
file would translate to something like this:
location /robots {
rewrite ^/robots.txt /_robots.php break;
}
location /sitemap {
rewrite ^/sitemap-post.xml /_sitemap.php break;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
You should create your own nginx template and assign that template to your site.
1 Like
eris
3
3 Likes
pdc
4
thanks eris and sahsanu that its work 
1 Like