I'm running on Nginx server.
I try to rewrite my URL using .htacces file:
RewriteEngine On RewriteBase / RewriteRule ^search/(.+)/page=(.+)$ search-results.php?q=$1&page=$2
It give me Internal Error 500. Any help?
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.Sign up to join this community
Welcome to WSE. Nginx doesn't support .htaccess and if you trying to use .htaccess with Nginx you are doing it incorrectly.
Apache's .htaccess is powerful and, as I have now learned (thanks @closetnoc), it caches the .htaccess file until it changes on the disk to avoid reloading it each and everytime. However, you wanted Nginx for it's speed didn't you, so to achieve a similar functionality with Nginx it takes a different approach, one which properly utilises the Nginx config file.
See this link for more details https://www.nginx.com/resources/wiki/start/topics/examples/likeapache-htaccess/
For further details on how to translate your .htaccess commands to Nginx, google "Converting .htaccess to Nginx"