Knowledgebase

How to Create a User-friendly URL Using .htaccess File

 

If your website's URL is lengthy, like example.com/files/folder/sitemap.html, you can simplify it to "example.com/sitemap" with the help of an htaccess file.

Customize this line to suit your specific requirements and then add the code to your htaccess file:

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

This will allow you to create a more concise and user-friendly URL for your website.

  • Redirect, htaccess
  • 0 Users Found This Useful
Was this answer helpful?

Powered by WHMCompleteSolution