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

240
Views
How to remove .php extention from url using htaccess?

How to remove php extension my url and question marks replace with slashes

http://eeroju.in/telugu/post.php?post_id=348 

to

http://eeroju.in/telugu/post/post_id/348 

I am using below code

        RewriteEngine On

        # Unless directory, remove trailing slash
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^([^/]+)/$ http://localhost/telugu/$1 [R=301,L]

        # Redirect external .php requests to extensionless url
        RewriteCond %{THE_REQUEST} ^(.+)\.php([#?][^\ ]*)?\ HTTP/
        RewriteRule ^(.+)\.php$ http://localhost/telugu/$1 [R=301,L]

        # Resolve .php file for extensionless php urls
        RewriteRule ^([^/.]+)$ $1.php [L]
        ---
        <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteRule ^route-page\.php$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /route-page.php [L]
        </IfModule>
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

include this in your .htaccess code **

 Options +Indexes +MultiViews

** in your html code, to link to another page do this

<a href="next-page">Click here</a> to go to next page

next-page is an .php file, but can be rendered to on the browser without the .php extension.

over 4 years ago · Santiago Trujillo Report

0

Try to add following settings

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.php [NC,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!