因此,我有一个名为页面的文件夹,其中包括我的网站的页面,当打开这些文件之一的网址读-
斑马鱼网页/页面/联系方式
我希望它只是读
斑马鱼网/联系人
我已经有了这个htaccess文件来删除任何.php .html扩展名,我也想继续使用。我没有一个线索如何写这些htaccess文件只是从网上复制它,并为我量身定制!
RewriteEngine on
RewriteRule ^(themes|order-now|submissions|faq|contact)$ $1.php [NC,L]
RewriteRule ^(home|faq)$ $1.html [NC,L]
1条答案
按热度按时间irtuqstp1#
1.您已经在
/pages/
子目录中有一个.htaccess,其中包含.php
和.html
扩展的一些规则1.您希望重定向到较短的URI
/contact
而不是/pages/contact
有了这些,你就可以有这样的规则:
站点根
.htaccess
:pages/.htaccess
: