-4

I am developing a website in my localhost using xampp. I want to make SEO friendly url like this.

Currently I access the page like this, http://example.com/myproject/page.php?id=10

I want to change this as bellow, http://example.com/myproject/page.html?id=10

I tried this using .htaccess, but sometimes I found it redirecting to .php, but I don't like so. I need permanent fix. So when user type .html it will access .php files, but no extension will change on their browser.

esqew
  • 42,425
  • 27
  • 92
  • 132
user3783411
  • 37
  • 1
  • 7

1 Answers1

0

try this

RewriteEngine on
RewriteRule ^(.*)\.html$ $1.php

when you will access page1.html the system will look for: page1.php

Vijayaragavendran
  • 726
  • 1
  • 10
  • 21