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

423
Views
RewriteCond fetch array parameters from Query_String and convert into path while retaining the remaining parameters

How to allow few parameters to continue to be redirected while one paramter which is an array to be converted into a string in the url path

example: param1[]=apple&price=1,10 should become /apple/?price=1,10

Orginal url: example.com/path1/?param1[]=apple&param2=1,100
Expected redirection: example.com/path1/apple/?param2=1,100

Orginal url: example.com/path1/path2/?param[]=apple&param2=1,100&param3=yes
Expected redirect: example.com/path1/path2/apple/?param2=1,100&param3=yes
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You may use this redirect rule that will handle param1[]= query parameter anywhere:

RewriteEngine On

RewriteCond %{QUERY_STRING} ^(.*&)?param1\[\]=([^&]*)(?:&(.*))?$ [NC]
RewriteRule ^(.*?)/?$ /$1/%2?%1%3 [R=301,NE,L]
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!