main logo

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

Share
Try Medha Cloud for free
Click below to sign up and get $200 of credit to try our products over 60 days!
Contents
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.

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]

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 Hosting Private Limited
#74, 7 Th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

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