Page 1 of 1

mod_rewrite

Posted: Fri Feb 12, 2010 5:47 am
by learnerabn
in my apache server mod_rewirte module is loaded but
the url in my localhost is not changing according to my htaccess file
can any bicy help me?

Re: mod_rewrite

Posted: Fri Feb 12, 2010 7:04 am
by papa
What does your htaccess file look like?

Re: mod_rewrite

Posted: Fri Feb 12, 2010 9:48 am
by pickle
Does your Apache config allow .htaccess files?

Re: mod_rewrite

Posted: Fri Feb 12, 2010 12:53 pm
by learnerabn
i uncommented the load rewrite module.... line in my apache config file.
so i thought it'll allow access to htaccess file
how can i confirm whether it'll allow access to htaccess file r not?

Re: mod_rewrite

Posted: Fri Feb 12, 2010 1:31 pm
by Eran
You need the following statement in your <directory> directive for your document root -

Code: Select all

AllowOverride All
http://httpd.apache.org/docs/2.0/mod/co ... owoverride

Re: mod_rewrite

Posted: Mon Feb 15, 2010 8:52 am
by learnerabn
do mean that the following lines should present?

Code: Select all

<Directory "c:/wamp/www/...">
    #
    # Possible values for the Options directive are "None", "All",
    .
    .
    .
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride all
 
yes it is in my http.conf file.

Re: mod_rewrite

Posted: Tue Feb 16, 2010 5:22 am
by learnerabn
plz can any one help me?

Re: mod_rewrite

Posted: Tue Feb 16, 2010 5:51 am
by Eran
papa wrote:What does your htaccess file look like?

Re: mod_rewrite

Posted: Wed Feb 17, 2010 12:26 am
by learnerabn
i cant understand your question properly..
it looks like just a text file.

Re: mod_rewrite

Posted: Wed Feb 17, 2010 2:00 am
by papa
Paste the content from that file to this forum so other people than your computer can read it.. :)

Re: mod_rewrite

Posted: Wed Feb 17, 2010 12:18 pm
by learnerabn
hey i got it but i have problem in one of my rewrite rule

Code: Select all

RewriteRule ^prod_det/([0-9]+)/$ prod_det.php?pr_id=$1
this rule does not working can you tell me what is wrong with this?