Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

170
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda