RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]

This works when i am typing in the url like www.anything.com/home, but when i click one of the link of the webpage i created, it shows the .php extension. Please Help!!!

Recommended Answers

All 3 Replies

Is the link ending in the .php extension? if so then there is your issue. Change all links to the name without the extension.

Yes, page links are look like <a href="home.php">Home</a>. When i click on the link then it shows home.php. When i remove (.php) extension from the attribute value then it shows HTTP Error 404.

thank you so much for your reply... i dont know, but today its working fine... when i remove the extension from the link... & try again... thnx for suggesting me...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.