Score:0

can't integrate .htaccess to nginx conf

cn flag

we have .htaccess file including:

RewriteEngine On
    # If an existing asset or directory is requested go to it as it is
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
    RewriteRule ^ - [L]
    # If the requested resource doesn't exist, use index.html   
RewriteRule ^ /index.html

after converting it to nginx rules with some site or tools it still isn't working. Can anyone help me?

in flag
Please provide the nginx rules you tried.
cn flag
location ~ ^(.*)$ { } location / { rewrite ^(.*)$ /index.html; }
in flag
Please edit the rules into your question and format it properly.
Richard Smith avatar
jp flag
Try: `location / { try_files $uri $uri/ /index.html; }`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.