简体   繁体   中英

Showing “mydomain.com” if I enter “mydomain.com/index.htm”

Like most servers, if I enter: www.mydomain.com, my server shows www.mydomain.com/index.htm and my Browser continues to show www.mydomain.com

But if I enter into my Browser www.mydomain.com/index.htm, can I tweak htaccess to show www.mydomain.com in my Browser?

You can use the following

RewriteEngine on

RewriteCond %{THE_REQUEST} /index\.htm [NC]
RewriteRule ^ / [L,R]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM