How to create a user-friendly URL using htaccess Print

  • 0

 

If you are using a long URL, such as example.com/files/folder/sitemap.html, you can change it to "example.com/sitemap" using htaccess.

To do that, you only need to modify the line below according to your needs, and then add this code to your htaccess file.

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


Was this answer helpful?

« Back