开发者

why is mod_rewrite facility working?

I am开发者_运维百科 trying to do simple rewriting url with using mod_rewrite facility of Apache.
As they said i firstly remove the # from the

LoadModule rewrite_module modules/mod_rewrite.so

from conf. file. then i restart my apache.

now what i want is something like this...

on my index page there is one menu in which their is one link of "aboutus" like this..

<a href="aboutus"><strong>about</strong></a>

now in my htaccessfile, i had written something like this...

Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^aboutus$ tempindex.php?id=3
</IfModule>

and if i tried to click on the aboutus then its shows error HTTP 404 - Not Found.

EDIT: I am trying to make my url as

www.example.com/aboutus

but actual the url will be

www.example.com/tempindex.php?id=3


You can use the rewrite log and rewrite log level directives in your httpd.conf to get Apache to tell you all about the matches it makes (or doesn't).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜