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

424
Views
URL Re-Writing with .htaccess in custom php (xampp) on windows 10

I want to re-write the following url from:

www.phcc.com/reports/caseFullDtlByCaseSno.php?case_sno=1

  To

http://www.phcc.com/reports/1/caseFullDtlByCaseSno.html

For this i have written the following .htaccess file inside the reports directory which is the sub-directory of the website root:

RewriteEngine on  
RewriteBase /reports/

RewriteRule ^(.*)/(\d+)\.php $1=case_sno&$2.html [NL,L]  
RewriteRule ^(.*)/(\d+)\.html $1=case_sno&$2.php [L]

but it does not complete the request as i need it. What should i do?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Try with below, I am assuming the html files are not existent.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([\d]+)/([\w-]+)\.html$ $2.php?case_sno=$1 [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!