robocopper
11-21-2010, 04:06 PM
Working with cakePHP
My index.php is in sub/app/webroot
Previously, on shared hosting I just replaced "domain.com/" with "domain.com/app+core directories"
I've moved to dedicated virtual server and am hitting a 403 forbidden error: "You don't have permission to access /sub/ on this server."
Permission is set to 755.
In domain.com/sub/app -> .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /sub/app/
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
In domain.com/sub/app/webroot -> .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteBase /sub/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
I've tried:
Right now httpdocs/ contains blank index.html and simple redirect: Redirect /index.html http://arizonadealz.com/sub/
Creating another .htaccess file for /sub, but that seemed to confound things further.
Thanks for the help.
My index.php is in sub/app/webroot
Previously, on shared hosting I just replaced "domain.com/" with "domain.com/app+core directories"
I've moved to dedicated virtual server and am hitting a 403 forbidden error: "You don't have permission to access /sub/ on this server."
Permission is set to 755.
In domain.com/sub/app -> .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /sub/app/
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
In domain.com/sub/app/webroot -> .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteBase /sub/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
I've tried:
Right now httpdocs/ contains blank index.html and simple redirect: Redirect /index.html http://arizonadealz.com/sub/
Creating another .htaccess file for /sub, but that seemed to confound things further.
Thanks for the help.