How to use mod_rewrite?

You can use the Apache server module mod_rewrite on the hosting. This module is used to create "friendly" URLs. The mod_rewrite module configuration requires creating a file called .htaccess in the domain directory and then adding the server's directives to it.

You can read more about mod_rewrite and how to use it here.


If you have URL "" and you want to shorten it to "", you can use the following .htaccess content:

RewriteEngine on
RewriteRule ^file$ /path/to/file.php