我尝试使用Apache的mod_rewrite工具来简单地重写url。
正如他们所说,我首先从
LoadModule rewrite_module modules/mod_rewrite.so
从conf.文件。然后我重新启动我的apache。
现在我想要的是这样的东西。。。
在我的索引页上有一个菜单,其中有一个关于“aboutus”的链接。。
<a href="aboutus"><strong>about</strong></a>
现在在我的htaccess文件中,我写了这样的东西。。。
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^aboutus$ tempindex.php?id=3
</IfModule>
错误HTTP 404-未找到。
我试图将我的url设置为
www.example.com/aboutus
但实际的网址是
www.example.com/tempindex.php?id=3