Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
htaccess RewriteRule force to put s in the url

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.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!