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

Modify this line according to your needs and then add this code to your .htaccess file.


RewriteEngine on
RewriteRule ^sitemap/$   /files/folder/sitemap.html [L]
  • 48 Users Found This Useful
Was this answer helpful?

Related Articles

How can I change my PHP version?

You can easily select the PHP version most compatible with your site by logging into your cPanel...

Help my site is down, why cant I load my website?

Wait, hold on a sec! Do not panic!   Please go through this check list before contacting us, if...

I've updated my domain's nameservers but my site still does not come up, How come?

Once you update your name servers (DNS) for your domain, it can take anywhere from a few hours to...

Do you block any ports?

Our firewalls block all inbound and outbound non-standard ports, if your application is having...

What is the difference between parked, addon, and subdomains?

An addon domain is a fully functional domain that can be created from your cPanel control panel....