开发者

basic linking question

开发者 https://www.devze.com 2023-01-21 21:29 出处:网络
I\'ve always added the file extension to a link \"contact.php\" is there anything wrong with excluding it and simply having <开发者_StackOverflow社区;a href=\"contact\">? seems to work fine, as I

I've always added the file extension to a link "contact.php" is there anything wrong with excluding it and simply having <开发者_StackOverflow社区;a href="contact">? seems to work fine, as Im having a lot of trouble with .htaccess removing the file extensions. thx


If this works, then probably thanks to Apache's content negotiation / MultiViews. A proper set of mod_rewrite rules would be more reliable because it doesn't rely on Options +MultiViews being activated on the server, but if it works on the server it will be running on in the long term, it should be fine.

Here is an answer that should point you in the right direction if you still want to use mod_rewrite.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号