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).
精彩评论