Note that there are some explanatory texts on larger screens.

plurals
  1. PORewrite URL to subfolder with multiple APPs
    primarykey
    data
    text
    <p>I have multiple CakePHP Projects hosted on same domain and some randoms folders with randons files, for organize I separated APPs on folder, but I have the "main" app that are in <em>site</em> folder, when user access domain it should rewrite URL to /site, my problems are with randoms folders, when I try access domain.com/exist_folder it redirect me to /site.</p> <p>I dont want to rewrite if file/directory exist on server.</p> <p><strong>Example of FTP Tree</strong></p> <pre><code>public_html/ -cakephp (CakePHP Core)/ - ... -site (CakePHP App)/ - ... -.htaccess -webroot/ -.htaccess -exist_folder/ - whateverfiles.ext -app1 (CakePHP App)/ - ... -.htaccess -webroot/ -.htaccess -folder1/ -temp/ -images -videos -.htaccess </code></pre> <p><strong>My .htaccess</strong></p> <p><strong>public_html/.htaccess</strong></p> <pre><code>&lt;IfModule mod_rewrite.c&gt; RewriteEngine on RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^$ site/ [L] RewriteRule (.*) site/$1 [L] &lt;/IfModule&gt; </code></pre> <p><strong>site/.htaccess AND app1/.htaccess</strong></p> <pre><code>&lt;IfModule mod_rewrite.c&gt; RewriteEngine on RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] &lt;/IfModule&gt; </code></pre> <p><strong>site/webroot/.htaccess AND app1/webroot/.htaccess</strong></p> <pre><code>&lt;IfModule mod_rewrite.c&gt; RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] &lt;/IfModule&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload