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

303
Views
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 4 years ago · Santiago Trujillo
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!