RewriteEngine On
RewriteRule ^(.*)\.html$ $1.php [L]
If you want it to be done as a redirect instead of just a rewrite modify the [L]
to [L,R]
More Related Contents:
- Redirect non-www to www in .htaccess
- .htaccess mod_rewrite – how to exclude directory from rewrite rule
- .htaccess redirect all pages to new domain
- Password protect a specific URL
- htaccess Access-Control-Allow-Origin
- How to write htaccess rewrite rule for seo friendly url
- What exactly does the Multiviews options in .htaccess?
- Block all bots/crawlers/spiders for a special directory with htaccess
- How to get MAMP to read .htaccess files
- Add Trailing Slash .htaccess
- How can I redirect to a different domain without changing the URL in the address bar?
- htaccess subdomain
- Issue In Removing Double Or More Slashes From URL By .htaccess
- Allow/deny image hotlinking with .htaccess
- Best Practice: 301 Redirect HTTP to HTTPS (Standard Domain)
- ‘hash’ url rewrite in .htaccess
- htaccess redirect if URL contains a certain string
- .htaccess to restrict access to folder
- .htaccess redirect all pages to the homepage on a new domain
- .htaccess redirect – automatically add www. if no subdomain exists
- .htaccess URL redirect
- .htaccess redirect without changing address bar
- How do I write a .htaccess file to make CodeIgniters URL routing work?
- Rewrite URL with .htaccess for multiple parameters
- 301 redirect .htaccess
- htaccess code to remove extension AND add+force trailing slash?
- Reference capture groups of multiple RewriteCond in RewriteRule
- .htaccess rewrite URL with a question mark “?”
- .htaccess redirect to all IP’s but mine
- How can I fix the ‘Missing Cross-Origin Resource Sharing (CORS) Response Header’ webfont issue?