grifter

msg:1520190 | 2:49 pm on Jul 23, 2003 (gmt 0) |
A quick guess. This line: 127.0.0.1 - - [23/Jul/2003:13:50:54 +0100] [localhost/sid#32b5b8][rid#642690/initial] (2) rewrite /paul/index.html -> /paul/index.html I'm not sure, but will rewriting to /paul/index.html (the same URL) just kick off the rewrite engine over and over indefinitely?
|
deckchirboy

msg:1520191 | 3:13 pm on Jul 23, 2003 (gmt 0) |
Thanks Grifter, but no, you would need to force this with an [N] flag to reapply the rules. The same thing happens regardless of the input url as long as it contains the word paul, eg localhost/paul is a fool/idiot.html
|
Storyteller

msg:1520192 | 3:25 pm on Jul 23, 2003 (gmt 0) |
deckchirboy, you should have your document root path prepended to the final resolved path, with appropriate message going in rewrite.log Why this isn't happening, I don't exactly know. In which section of httpd.conf have you placed your mod_rewrite directives: server config or virutal host?
|
deckchirboy

msg:1520193 | 4:35 pm on Jul 23, 2003 (gmt 0) |
Hi Story, The rewrite rule is in the main section and doc root is set correctly here is the relevant part of /server-info:- Server Version: Apache/2.0.39 (Win32) Server Built: Jun 17 2002 23:16:55 API Version: 20020612:1 Hostname/port: localhost:80 Timeouts: connection: 300 keep-alive: 300 MPM Name: WinNT MPM Information: Max Daemons: 64 Threaded: yes Forked: no Server Root: C:/Server/Apache2 Config File: conf/httpd.conf Module Name: mod_rewrite.c Content handlers: yes Configuration Phase Participation: Create Directory Config, Merge Directory Configs, Create Server Config, Merge Server Configs Request Phase Participation: Translate Path, Check Type, Fixups Module Directives: RewriteEngine - On or Off to enable or disable (default) the whole rewriting engine RewriteOptions - List of option strings to set RewriteBase - the base URL of the per-directory context RewriteCond - an input string and a to be applied regexp-pattern RewriteRule - an URL-applied regexp-pattern and a substitution URL RewriteMap - a mapname and a filename RewriteLock - the filename of a lockfile used for inter-process synchronization RewriteLog - the filename of the rewriting logfile RewriteLogLevel - the level of the rewriting logfile verbosity (0=none, 1=std, .., 9=max) Current Configuration: RewriteEngine on RewriteLog "C:/Server/Apache2/logs/rewrite.log" RewriteLogLevel 9 RewriteCond %{THE_REQUEST} paul RewriteRule paul c:/server/htdocs/paul/index.html [L] As you can see I changed the rule to recognise and replace the name eric and to prepend the doc root manually and then the document root was added again by the system Here is the log file 127.0.0.1 - - [23/Jul/2003:17:30:14 +0100] [localhost/sid#32b5b8][rid#642690/initial] (2) init rewrite engine with requested uri /eric 127.0.0.1 - - [23/Jul/2003:17:30:14 +0100] [localhost/sid#32b5b8][rid#642690/initial] (3) applying pattern 'eric' to uri '/eric' 127.0.0.1 - - [23/Jul/2003:17:30:14 +0100] [localhost/sid#32b5b8][rid#642690/initial] (4) RewriteCond: input='GET /eric HTTP/1.1' pattern='eric' => matched 127.0.0.1 - - [23/Jul/2003:17:30:14 +0100] [localhost/sid#32b5b8][rid#642690/initial] (2) rewrite /eric -> c:/server/htdocs/paul/index.html 127.0.0.1 - - [23/Jul/2003:17:30:14 +0100] [localhost/sid#32b5b8][rid#642690/initial] (2) local path result: c:/server/htdocs/paul/index.html 127.0.0.1 - - [23/Jul/2003:17:30:14 +0100] [localhost/sid#32b5b8][rid#642690/initial] (2) prefixed with document_root to C:/Server/Apache2/htdocsc:/server/htdocs/paul/index.html 127.0.0.1 - - [23/Jul/2003:17:30:14 +0100] [localhost/sid#32b5b8][rid#642690/initial] (1) go-ahead with C:/Server/Apache2/htdocsc:/server/htdocs/paul/index.html [OK] I am becoming very frustrated so if you can help further please please do so.
|
figment88

msg:1520194 | 4:59 pm on Jul 23, 2003 (gmt 0) |
I'm by no means an expert on this but I think you should add in a RewriteBase directive after turning on the engine such as: RewriteEngine on RewriteBase /
|
deckchirboy

msg:1520195 | 5:39 pm on Jul 23, 2003 (gmt 0) |
err I think thats for per directory rewrites but thanks
|
deckchirboy

msg:1520196 | 10:19 am on Jul 24, 2003 (gmt 0) |
Resorted to upgrading Apache to version 2.0.47 and now it works. So if anyone reading this is trying to get mod rewrite working with apache win32 and your version is less than 2.0.47 then you know what to do! Thanks for the help
|
|