Knowledge Base Article

How to set a different file extension with a rewrite rule?

If you need to refer to your files using an extension different from their default one, you can add this rewrite rule to your .htaccess file:

 

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.+)\.inx$ /$1.php [NC,L]

 

 

This way you will be able to open your .php files with .inx extension. For example, you will be able to refer to index.php as index.inx.



Rating

Please indicate if this article was helpful for you.

rating :  4.8 from 5
views :  2801
votes :  13

Related Articles

Views

Haven't found what you are looking for? Suggest an article HERE.

powered by

Valid XHTML 1.0 Strict Valid CSS!