Knowledge Base

How to create a user-friendly URL using .htaccess?

If your website is using long URL like example.com/files/folder/sitemap.html, you can change it into "example.com/sitemap" in .htaccess

Note that this may take some tweaking and optimizing to get right and is unique to your application, so this is an example only. With that in mind, use the following .htaccess code sample to get you started with making the URLs look nice.


RewriteEngine on
RewriteRule ^sitemap/$ /files/folder/sitemap.html [L]

Please rate this article to help us improve our Knowledge Base.

0 0