You are not logged in.

#1 2007-12-29 19:57:39

dawidgarus
Member
Registered: 2007-12-29
Posts: 2

apache + mod_rewrite

i've got a problem with mod_rewrite - it doesn't work.

(~)$ cat /etc/httpd/conf/httpd.conf| grep mod_rewrite
LoadModule rewrite_module          modules/mod_rewrite.so
(~)$ cat /home/httpd/html/.htaccess
Options FollowSymLinks
RewriteEngine On
RewriteRule ^index.html$ index.php [L]

http://localhost/index.php works fine but http://localhost/index.html gives 404 error hmm
could someone know, where the fsck is problem?

btw sorry for my english if i made some mistakes. i'm from poland wink

Offline

#2 2007-12-29 21:03:42

Crooksey
Member
From: UK ~
Registered: 2006-08-14
Posts: 415
Website

Re: apache + mod_rewrite

Does index.html have the correct or same permisions as index.php ?


Arch Linux since 2006
Python Web Developer + Sys Admin (Gentoo/BSD)

Offline

#3 2007-12-29 21:55:24

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: apache + mod_rewrite

Do you have allowoverrides set for that directory in apache?
If not, then your .htaccess might not be able to enable rewriting.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#4 2007-12-30 16:35:01

dawidgarus
Member
Registered: 2007-12-29
Posts: 2

Re: apache + mod_rewrite

thanks. it was allowoverride's fault.
and btw i've got another problem. apache don't parse php files when them are in different directory than "/home/httpd/html", e.g. if i set DocumentRoot (and <Directory "..."> too, of course) to "/mnt/data/htdocs". why?

Last edited by dawidgarus (2007-12-30 16:40:18)

Offline

#5 2007-12-30 17:59:49

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: apache + mod_rewrite

hard to say..
check the apache error log and see if there is anything in it of relevance, and maybe check permissions on that directory...make sure that the user apache runs under can enter the directory...


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2008-01-01 16:04:46

snowbear
Member
From: Prague, Czech Republic
Registered: 2007-02-02
Posts: 11

Re: apache + mod_rewrite

You could try to add

php_admin_value open_basedir "/path/to/Directory:/usr/lib/php:/tmp"

to proper <Directory> ... </Directory> section of your configuration file.

Offline

Board footer

Powered by FluxBB