UnixGuru

×
×

Redirect all files with certain extension

Back

To re-direct all of one type of file to another, such as example.com/file.php to example.com/file.htm

RewriteEngine On RewriteCond %{REQUEST_URI} .php$ RewriteRule ^(.*).php$ /$1.htm [R=301,L]

Was this article helpful?
Dislike0 Like0

Views: 246