fastcgi and mod_rewrite
Tobias Neumann <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi
I have an rails fastcgi app and want to create some RewriteRules for it.
Basically I have these rewrite rules:
RewriteRule ^(.*\/)*index\.([0-9]+)\.([0-9]+)\.html$ /keywords/show/$2?page=$3
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
So when I call /index.123.4.html, internally in rails
/keywords/show/123?page=4 should be requested, instead
/index.123.4.html is still requested an processed within rails.
The rewrite debug log says:
(3) [perdir /Users/user/myapp/public/] strip per-dir prefix:
/Users/user/myapp/public/index.1.1.html -> index.1.1.html
(3) [perdir /Users/user/myapp/public/] applying pattern
'^(.*\/)*index\.([0-9]+)\.([0-9]+)\.html$' to uri 'index.1.1.html'
(2) [perdir /Users/user/myapp/public/] rewrite 'index.1.1.html' ->
'/keywords/show/1?page=1'
(3) split uri=/keywords/show/1?page=1 -> uri=/keywords/show/1, args=page=1
(3) [perdir /Users/user/myapp/public/] applying pattern '^(.*)$' to uri
'/keywords/show/1'
(4) [perdir /Users/user/myapp/public/] RewriteCond:
input='/keywords/show/1' pattern='!-f' => matched
(2) [perdir /Users/user/myapp/public/] rewrite '/keywords/show/1' ->
'dispatch.fcgi'
(3) [perdir /Users/user/myapp/public/] add per-dir prefix:
dispatch.fcgi -> /Users/user/myapp/public/dispatch.fcgi
(2) [perdir /Users/user/myapp/public/] strip document_root prefix:
/Users/user/myapp/public/dispatch.fcgi -> /dispatch.fcgi
(1) [perdir /Users/user/myapp/public/] internal redirect with
/dispatch.fcgi [INTERNAL REDIRECT]
redir#1
(3) [perdir /Users/user/myapp/public/] strip per-dir prefix:
/Users/user/myapp/public/dispatch.fcgi -> dispatch.fcgi
(3) [perdir /Users/user/myapp/public/] applying pattern
'^(.*\/)*index\.([0-9]+)\.([0-9]+)\.html$' to uri 'dispatch.fcgi'
(3) [perdir /Users/user/myapp/public/] strip per-dir prefix:
/Users/user/myapp/public/dispatch.fcgi -> dispatch.fcgi
(3) [perdir /Users/user/myapp/public/] applying pattern '^(.*)$' to
uri 'dispatch.fcgi'
(4) [perdir /Users/user/myapp/public/] RewriteCond:
input='/Users/user/myapp/public/dispatch.fcgi' pattern='!-f' =>
not-matched
(1) [perdir /Users/user/myapp/public/] pass through
/Users/user/myapp/public/dispatch.fcgi
Thanks in advance,
Tobias
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/