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

If your website is using long URLs, e.g. 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]

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I modify the permissions of my files or directories?

You can do that either via FTP (chmod, for more information please refer to your FTP client...

How to setup FTP client and upload files?

In this tutorial we will show you how to setup FileZilla FTP client to upload your files to our...

I have uploaded my files, why can't I see them?

Please always ensure that you have uploaded your files under the public_html folder.If you have...

How to redirect a page to another page or website using .htaccess?

If the page on your website is no longer exist and you want to redirect it to another page or...

php error: Allowed memory size of x bytes exhausted

If you are getting an error "Allowed memory size of... in file /directory/folder/yourscript.php",...