How to make a user-friendly URL by using .HTAccess

You are here:
  • Main
  • Others
  • How to make a user-friendly URL by using .HTAccess
← All Topics

If your site has some long URL like example.com/files/folder/sitemap.html, it’s possible to make it into “example.com/sitemap” in .htaccess

you can simply change this line according to your requirements and then add the code to .htaccess file.

Rewrite Engine on
Rewrite Rule ^sitemap/$   /files/folder/sitemap.html [L]