You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ryan McConigley <ry...@csse.uwa.edu.au> on 2007/02/15 07:12:26 UTC

[users@httpd] Rewrite rules under 2.2.4

	Hi everyone, I've got a little problem here which I'm curious if someone can tell me if its normal or not.

	I recently upgraded our servers here from 2.0.49 to 2.2.4.  We have a couple of rewrite rules which use to work fine: 

        RewriteEngine on
        Rewriterule     ^/faq/(.*)      http://web.csse.uwa.edu.au/school_and_systems_information/faq  [L,R=permanent]

	That stopped working under 2.2.4, but I've discovered if I create an empty directory called "faq" in the relevent location, then it works ok.  Without the directory I get a "File does not exist: /path/faq" in the error log.

	So it seems to me some part of Apache is checking to see if the path exists before applying the rule, which means I'd have to have a bundle of empty directories to get my re-write working, which sort of defeats the purpose.

	Anyone have any suggestions?  I've been trying my voodoo skills with rewrites, but I think its more mumbo-jumbo than voodoo.

	Cheers, 
		Ryan.

--
          Ryan McConigley - Systems Administrator                  _.-,
     Computer Science   University of Western Australia        .--'  '-._
       Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089       _/`-  _      '.
Ryan[@]csse.uwa.edu.au - http://www.csse.uwa.edu.au/~ryan  '----'._`.----. \
                                                                     `     \;
 "You're just jealous because the voices are talking to me"                ;_\



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Rewrite rules under 2.2.4

Posted by Ryan McConigley <ry...@csse.uwa.edu.au>.
At 01:19 AM 16/02/2007, you wrote:
>Ryan McConigley wrote:
>>        RewriteEngine on
>>        Rewriterule     ^/faq/(.*)      http://web.csse.uwa.edu.au/school_and_systems_information/faq  [L,R=permanent]
>
>It seems to me that you're using the rules in per-server context (leading slash), is that correct?
>
>>        So it seems to me some part of Apache is checking to see if the path exists before applying the rule,
>
>Only in directory context, but that might change the behavior only under  certain circumstances (hint: r->filename, path-info; enabled MultiViews).
>
>>        Anyone have any suggestions?
>
>What can you find in your rewrite log (use RewriteLoglevel 5)?

        Oooh, didn't know about the rewritelog function, pays me for not paying more attention to the logs.  Fixed it up now by expanding the regex to cover a wider range of matches.  I'm just not sure why it use to work find under the old version, but not the new one.  Puzzling, but I'm use to such things on computers.

        Thanks,
                Ryan.

--
          Ryan McConigley - Systems Administrator                  _.-,
     Computer Science   University of Western Australia        .--'  '-._
       Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089       _/`-  _      '.
Ryan[@]csse.uwa.edu.au - http://www.csse.uwa.edu.au/~ryan  '----'._`.----. \
                                                                     `     \;
 "You're just jealous because the voices are talking to me"                ;_\



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Rewrite rules under 2.2.4

Posted by Bob <bo...@googlemail.com>.
Ryan McConigley wrote:
>         RewriteEngine on
>         Rewriterule     ^/faq/(.*)      http://web.csse.uwa.edu.au/school_and_systems_information/faq  [L,R=permanent]

It seems to me that you're using the rules in per-server context 
(leading slash), is that correct?

> 	So it seems to me some part of Apache is checking to see if the path exists before applying the rule,

Only in directory context, but that might change the behavior only under 
  certain circumstances (hint: r->filename, path-info; enabled MultiViews).

> 	Anyone have any suggestions?

What can you find in your rewrite log (use RewriteLoglevel 5)?

-- 
Bob

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org