main logo

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

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

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]

Surya Reddy
Surya Reddy
Surya works at Medha Cloud and has been there for two years. He's an expert in his field, and besides helping customers as a Technical Support Engineer, he also shares his insights through blogs. Always curious, Surya keeps an eye on the latest tech to stay ahead.
Share
Contents

Related Articles

medhacloud logo
USA:
Medha Cloud Solutions LLC
30 N Gould St Ste R, Sheridan, WY 82801,
Phone: +1 646 775 2855

India:
Medha Cloud Solutions Private Limited
#74, 7th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

E-Mail: sales@medhahosting.com
©Medha Cloud 2024. All rights reserved.