Nginx Friendly Urls

Asked

Viewed 159 times

1

I’m trying to create a Urlammable on my server, previously I used apache with this htaccess:

RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?subtopic=$1 

After switching to Nginx I started using:

rewrite ^(.*)$ /index.php?subtopic=$1;

However he is not redirecting as he should, when I try to access any page he plays to page 404

  • If possible put the code of your block. The DocumentRoot is that correct? Have you tried try_files ?

  • tried via try_files too, I did not get the expected result, as it would be the correct one ?

  • The DocumentRoot is correct? If possible post the code you tested using try_files

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.