Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    redirect with .htaccess

    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:

    Code:
    <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:

    Code:
    <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.
    Last edited by robocopper; 11-21-2010 at 05:09 PM. Reason: include specific error message

  • #2
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, i have problem with .htaccess
    When i run localhost , the website don't run and then del file htaccess so site run
    Who can help me conf .htaccess


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •