Re: Configure Cake's .htaccess to use other site with it's own .htaccess

2014-06-05 Thread passeios21
All the extra directives in the /extra/ .htaccess file may be too much.
All I have is:

 RewriteEngine on
 RewriteBase /app/
 RewriteRule ^$ webroot/ [L]
 RewriteRule (.*) webroot/$1 [L]



On Tuesday, May 27, 2014 2:11:16 PM UTC-4, Tomas Gonzalez Mendivelzúa wrote:


 Hi, I'm trying to run a site with it's own rewrite rules inside the 
 /app/webroot/ folder but I'm not being able to make it work.
 *Please tell me if this is the right place to post this or if I should 
 post it in some other place.*

 The site is in /app/webroot/extra/*
 Here are both .htaccess files:

 *Cake *(/app/webroot/.htaccess)

 IfModule mod_rewrite.c
 RewriteEngine On

 RewriteCond %{HTTPS} off
 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

 RewriteCond %{HTTP_HOST} !^www\.
 RewriteCond %{HTTP_HOST} !^local\.
 RewriteCond %{HTTP_HOST} !^staging\.
 RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php [QSA,L]
 /IfModule

 *Extra *(/app/webroot/extra/.htaccess)

 IfModule mod_rewrite.c
 RewriteEngine On

 RewriteCond %{HTTPS} off
 RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

 RewriteCond %{HTTP_HOST} !^(localhost|staging|host)?$ [NC]
 RewriteCond %{HTTP_HOST} !^www\. [NC]
 RewriteCond %{HTTP_HOST} !^local\. [NC]
 RewriteCond %{HTTP_HOST} !^staging\. [NC]
 RewriteRule ^ https%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

 RewriteEngine On
 RewriteCond %{SCRIPT_FILENAME} !-d
 RewriteCond %{SCRIPT_FILENAME} !-f

 RewriteRule ^.*$ ./index.php
 /IfModule


 I need to correct these files so that both sites work correctly.
 Any help will be very appreciated!


 Tom.


-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Configure Cake's .htaccess to use other site with it's own .htaccess

2014-05-28 Thread Tomas Gonzalez Mendivelzúa

Hi, I'm trying to run a site with it's own rewrite rules inside the 
/app/webroot/ folder but I'm not being able to make it work.
*Please tell me if this is the right place to post this or if I should post 
it in some other place.*

The site is in /app/webroot/extra/*
Here are both .htaccess files:

*Cake *(/app/webroot/.htaccess)

IfModule mod_rewrite.c
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} !^local\.
RewriteCond %{HTTP_HOST} !^staging\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
/IfModule

*Extra *(/app/webroot/extra/.htaccess)

IfModule mod_rewrite.c
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{HTTP_HOST} !^(localhost|staging|host)?$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^local\. [NC]
RewriteCond %{HTTP_HOST} !^staging\. [NC]
RewriteRule ^ https%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^.*$ ./index.php
/IfModule


I need to correct these files so that both sites work correctly.
Any help will be very appreciated!


Tom.

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.