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

118
Views
dynamic url chaning issue with multiple files

I have 2 files called "free.php" and "new.php". for example consider, The free.php contains Hi, $_GET['s']. new.php contains Hello, $_GET['s'].

I get URLs like https://website.com/free/file-access from https://website.com/free?s=file-access and https://website.com/new/john-smith from https://website.com/new?s=john-smith. that's fine.
but I have an issue with the result. https://website.com/new/john-smith loads "free.php" file code with "s=john-smith" values. I received "Hi john-smith" what I need is "Hello John-smith"

when I run free.php i want results like "Hi, file-access" ( URL be like : https://website.com/free/file-access)

when I run new.php i want results like "Hello, john-smith" (URL be like : https://website.com/new/john-smith)

my htaccess code is

RewriteCond %{THE_REQUEST} \s/(free)\?s=([^\s]+)\s [NC]
RewriteRule ^ /%1/%2? [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(?:[^/]*)/(.*)/?$ free.php?s=$1 [NC,QSA,L]

RewriteCond %{THE_REQUEST} \s/(new)\?s=([^\s]+)\s [NC]
RewriteRule ^ /%1/%2? [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(?:[^/]*)/(.*)/?$ new.php?s=$1 [NC,QSA,L]

.PHP removed using previous httacess code.

Please help me to solve this issue. thank you in advance.

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!