htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
RewriteRule ^member member.html [NC,L]
RewriteRule member/(.*)/(.*)$ member.html?a=$1&b=$2
so the should be like https://example.com/member/query_1/query_2
the problem is this link wont work unless I add (s) character to the end of member word in the url
so the working link is https://example.com/members/query_1/query_2
unless it return me 404 error its work fine in the xamp localhost but when I upload to server I have this issue.
You may use this code in site root .htaccess:
Options -MultiViews
RewriteEngine On
RewriteRule ^member/?$ member.html [NC,L]
RewriteRule member/([^/]+)/([^/]+)/?$ member.html?a=$1&b=$2 [L,QSA,NC]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+?)/?$ $1.html [L]
Options -MultiViews will turn content negotiation service off. Option MultiViews (see http://httpd.apache.org/docs/2.4/content-negotiation.html) is used by Apache's content negotiation module that runs before mod_rewrite and makes Apache server match extensions of files. So if /file is the URL then Apache will serve /file.html.