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 toindex.php as index.inx.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Brute Force Attack – What it is and How to Block It

Brute-force is a method of guessing your password by trying combinations of letters, numbers and...

What is pdftoppm and is it supported by Hostlantern?

Pdftoppm is a library that handles the conversion from Portable Document Format (PDF) files to...

How to clear your Internet browser’s cookies?

Sometimes you may need to clear the cookies saved by your browser. Basically the cookies...

Hacked Website

The most common reasons for a hacked (defaced) website include: - Outdated web application....

How to clean my files from malicious code?

If your website has been hacked and malicious content has been inserted into your files, you...