Your public folder htaccess should be
For localhost
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(development).* - [NC,L]
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
For Server
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com$
RewriteCond %{REQUEST_URI} !^/development/(.*)
RewriteRule ^$ app/webroot/ [L]
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com$
RewriteCond %{REQUEST_URI} !^/development/(.*)
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
On Thu, Feb 7, 2013 at 5:55 PM, Vanja Dizdarević <lex.non.scripta@gmail.com> wrote:
I am trying to exclude a first level directory from Cake (root folder app), as it should hold a different app.
/ holds the app
/development/ holds the tested version of the appThe directory structure:
Public folder
- .htaccess [modified]
- app
- .htaccess [unmodified]
- webroot
- .htaccess [unmodified]
- index.php [unmodified]
- ...
- ...
- lib
- Cake
- ...
- development
- app
- webroot
- index.php [dumps $_SERVER for test purposes]
So, my development structure still doesn't have an app inside (nor .htaccesses), just to test if my root .htaccess works.This is my modification of the root .htaccess:<IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{REQUEST_URI} ^/development.*RewriteRule (.*) - [L]RewriteRule ^$ app/webroot/ [L]RewriteRule (.*) app/webroot/$1 [L]</IfModule>What happens:/development/ shows the apache index of development folder/development/app/ shows the apache index of app folder
/development/app/webroot shows the root app (request is captured in spite of the development url match)./development/app/webroot SHOULD show me my /development/app/webroot/index.php file, right?
What the hell am I missing here?--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
Chetan Varshney
Ektanjali Softwares Pvt Ltd --
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment