Mod_rewrite problem


#1

i am trying to move my site to dreamhost but then mod_rewrite is not working anymore.
below is the content of my .htaccess file in the root dir of my web

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /([A-Za-z])/?([0-9])/?([A-Za-z]*)/?$
RewriteRule ^(.+) http://tyfmdiary.dreamhosters.com/index.phtml?user=%1&date=%2&mode=%3&IP=%{REMOTE_ADDR}&HTTP_X_FORWARDED_FOR=%{HTTP_X_FORWARDED_FOR} [L,P,E=abc:%{REMOTE_ADDR}]

when i go to
http://tyfmdiary.dreamhosters.com/anthony/1903/link
it returns Error404

P.S. the rewrite script works in my existing hosting but not dreamhost


#2

fyi, here is the error log

[Thu Apr 20 15:11:54 2006] [error] [client 128.2.161.91] File does not exist: proxy:http://tyfmdiary.toyoufromme.net/index.phtml?user=anthony&date=1903&mode=link&IP=128.2.161.91&HTTP_X_FORWARDED_FOR=/1903/link
[Thu Apr 20 15:11:54 2006] [error] [client 128.2.161.91] File does not exist: /home/toyoufromme/web/diary.toyoufromme.net/missing.html

then i try wget the url, it WORKS…!!

P.S. is there a default Error404 page pointing to missing.html?


#3

dear all, i just changed my .htaccess to the following, then it works. I am change i change the R-flag to P-flag, then it stops working

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /([A-Za-z])/?([0-9])/?([A-Za-z]*)/?$

RewriteRule ^(. ) http://tyfmdiary.dreamhosters.com/index.phtml?user=%1&date=%2&mode=%3&IP=%{REMOTE_ADDR}&HTTP_X_FORWARDED_FOR=%{HTTP_X_FORWARDED_FOR} [L,R]