• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

256
Vistas
how to replace middle keyword in url before '?' mark for url re-writing to write in .htaccess

my input url is

https://example.com/path/typeX?dataY=mydata

want output as

https://example.com/path/myfile.php?reqType=typeX&dataY=mydata

Please help me , I am new to url re-writing, my serrver is apache with php installed, thanks in advance.

I tried this

RewriteEngine On RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^path/([^\.]+)$ path/myfile.php?reqtype=$1&%1

it is giving correct result on https://htaccess.madewithlove.be/ but not working on server, server says the requested url was not found

over 3 years ago · Santiago Trujillo
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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda