Enabling Friendly URLs for your site

By default, Respond 6 references pages using their .html extension. This is done in both the menu and links created in the application. However, you can enable friendly URLs by changing the FRIENDLY_URLS property in your .env file to true. You will still need to make sure friendly URLs are supported by your server.

Sample .htaccess

A sample .htaccess is shown below for Apache servers. This is typically placed in the root of your site/site-name folder.

Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
ErrorDocument 404 /page/error
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/javascript "access plus 1 year"