Search code examples
apacheurlmod-alias

how to use remove file extension from url using alias


I want to remove the file extension for some of my files using Alias in my Apache site config file, but i just can't get it to work.

Here is an example:

Alias "/alias" "/the/real/path"

I have also tried this:

Alias /alias /the/real/path

With both i have tried the full path and the relative path from the root directory.

Does any one know how to probaly use Alias to do this?


Solution

  • Be sure to set AllowOverride All in the Directory config.

    Example:

    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>