Hello all,
I have an unusual layout of cake, but I believe I actually ahve a
mod_rewrite problem. My app works fine when requesting
'http://server/myfolder/' (tailing slash) but dies wiht a '400 -- bad
request' when i have no trailing slash.
Here are the relavant files:
DOCROOT/myfolder/.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
DOCROOT/myfolder/webroot/.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
And here's the mod_rewrite logs (level 2 - -anymore seemd like overkill)
REQUEST to '/myfolder' (DOES NOT WORK -- error 400 Bad Request):
[rid#8189034/initial] (2) init rewrite engine with requested uri
/myfolder
[rid#8189034/initial] (1) pass through /myfolder
[rid#8189034/initial] (2) [per-dir /home/DOCROOT/myfolder/] rewrite
/home/DOCROOT/myfolder -> webroot//home/DOCROOT/myfolder
REQUEST to '/myfolder/' (Works! Yay!):
[rid#8189034/initial] (2) init rewrite engine with requested uri /myfolder/
[rid#8189034/initial] (1) pass through /myfolder/
[rid#8189034/initial] (3) [per-dir /home/DOCROOT/myfolder/] add
path-info postfix: /home/DOCROOT/myfolder -> /home/DOCROOT/myfolder/
[rid#8189034/initial] (3) [per-dir /home/DOCROOT/myfolder/] strip
per-dir prefix: /home/DOCROOT/myfolder/ ->
[rid#8189034/initial] (3) [per-dir /home/DOCROOT/myfolder/] applying
pattern '^$' to uri ''
[rid#8189034/initial] (2) [per-dir /home/DOCROOT/myfolder/] rewrite -> webroot/
[rid#8189034/initial] (3) [per-dir /home/DOCROOT/myfolder/] add
per-dir prefix: webroot/ -> /home/DOCROOT/myfolder/webroot/
[rid#8189034/initial] (2) [per-dir /home/DOCROOT/myfolder/] strip
document_root prefix: /home/DOCROOT/myfolder/webroot/ ->
/myfolder/webroot/
[rid#8189034/initial] (1) [per-dir /home/DOCROOT/myfolder/] internal
redirect with /myfolder/webroot/ [INTERNAL REDIRECT]
Somehow I can not get my brain around how to redirecct the user on a
'myfolder' request to 'myfolder/'
I've tried lots of variants of:
RewriteRule ^$ /myfolder/ [R,L]
and
RewriteRule ^myfolder$ /myfolder/ [R,L]
RewriteBase /myfolder
RewriteRule ^$ /myfolder/ [R,L]
etc., but have not hit upon the solution.
Any help?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---