【发布时间】:2018-07-20 21:37:38
【问题描述】:
在我的网站上我有这样的东西:
example.pl/index.html and example.pl/gallery.html
我想用 htaccess 制作 url 别名,例如:
example.pl/homepage and example.pl/gallery
我找到了删除 .html 的解决方案,但我想用其他东西重写索引。
RewriteEngine On
RewriteBase /
RewriteRule ^page$ /subfolder/subfolder/thepage.php [L]
我在这里找到的解决 php 问题的解决方案对我不起作用。 此外,我应该将 .htacess 文件放在 public_html 文件夹还是主托管目录中? (对于这个简单的网站,我不使用 php 和数据库)。
【问题讨论】: