Forum Moderators: phranque

Message Too Old, No Replies

Apache/2.2.3 and mod rewrite - don't work!

Apache/2.2.3 and mod_rewrite - don't work!

         

LetItBe

12:08 pm on Nov 19, 2006 (gmt 0)

10+ Year Member



Hi

Module in httpd.conf is loaded correctly:
LoadModule rewrite_module modules/mod_rewrite.so

.htaccess file:
RewriteEngine on
RewriteRule ^go$ file.php

file.php exists.
I try to attempt url [localhost...] but i get this message:
The requested URL /go was not found on this server.

Obviously mod_rewrite don't pay attention on this. Where does the problem exits?

Many thanks

LetItBe

1:26 pm on Nov 19, 2006 (gmt 0)

10+ Year Member



...and by the way: I uploaded .htaccess and file.php to the remote server - works fine!
huh, my local server is driving my crazy..

many thanks for support!

jdMorgan

3:33 pm on Nov 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From Beginning Mod_rewrite [webmasterworld.com] in our Apache forum Library [webmasterworld.com]:

A. Mod_Rewrite the module has to be installed and available on the server.
B. you must have AllowOverride set to FileInfo or higher (All, etc.).
C. you must be able to follow sym links, usually Options +FollowSymLinks either in the httpd.conf (server configuration) or in the .htaccess file itself.
D. you must precede your rules/conditions with RewriteEngine on

Hopefully, step B or C will fix your problem.

Jim

LetItBe

3:51 pm on Nov 19, 2006 (gmt 0)

10+ Year Member



that's crazy, no effect Jim.

some from httpd.conf:

<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>

FalseDawn

4:57 pm on Nov 19, 2006 (gmt 0)

10+ Year Member



Try

RewriteEngine on
RewriteBase /
RewriteRule ^go$ file.php

And make sure to restart httpd!

LetItBe

5:51 pm on Nov 19, 2006 (gmt 0)

10+ Year Member



Finally I found out that Apache doesn't even make any commands of .htaccess file! That's nuts... My Apache is based in Windows XP, so this could be a reason?
How I can make .htaccess file work on Windows XP operating system?

Thanks!

jdMorgan

6:01 pm on Nov 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, WinXP...

You will have to change the name of .htaccess to something else like "htaccess" without a preceding dot, or "htaccess.txt", and use the AccessFileName [httpd.apache.org] directive to tell Apache to use that new filename instead.

Jim

LetItBe

6:14 pm on Nov 19, 2006 (gmt 0)

10+ Year Member



I'm pleased Jim - now this stuff works fine!

Cheers!

FalseDawn

7:44 pm on Nov 19, 2006 (gmt 0)

10+ Year Member



Glad you got it working, but I'm using XP and .htaccess works just fine...