mod_rewrite

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
learnerabn
Forum Commoner
Posts: 48
Joined: Wed Feb 10, 2010 12:56 am

mod_rewrite

Post 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?
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: mod_rewrite

Post by papa »

What does your htaccess file look like?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: mod_rewrite

Post by pickle »

Does your Apache config allow .htaccess files?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
learnerabn
Forum Commoner
Posts: 48
Joined: Wed Feb 10, 2010 12:56 am

Re: mod_rewrite

Post 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?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: mod_rewrite

Post 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
learnerabn
Forum Commoner
Posts: 48
Joined: Wed Feb 10, 2010 12:56 am

Re: mod_rewrite

Post 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.
learnerabn
Forum Commoner
Posts: 48
Joined: Wed Feb 10, 2010 12:56 am

Re: mod_rewrite

Post by learnerabn »

plz can any one help me?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: mod_rewrite

Post by Eran »

papa wrote:What does your htaccess file look like?
learnerabn
Forum Commoner
Posts: 48
Joined: Wed Feb 10, 2010 12:56 am

Re: mod_rewrite

Post by learnerabn »

i cant understand your question properly..
it looks like just a text file.
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: mod_rewrite

Post by papa »

Paste the content from that file to this forum so other people than your computer can read it.. :)
learnerabn
Forum Commoner
Posts: 48
Joined: Wed Feb 10, 2010 12:56 am

Re: mod_rewrite

Post 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?
Post Reply