Pradeep Singh
Pradeep Singh

Reputation: 1290

.htaccess rules to have cakephp in root and core php in subfolder

I have an cakephp application as the root folder and .htaccess is written as follows

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ app/webroot/ [L]
    RewriteRule (.*) app/webroot/$1 [L]
</IfModule>

Now what I want is a core php application in its Subfolder, but .htaccess is causing trouble for me. What is best way to write the .htaccess so both can work.

Upvotes: 1

Views: 91

Answers (1)

AD7six
AD7six

Reputation: 66378

The easiest solution is to simply put whatever it is you want to access in the webroot directory i.e. for the url http://example.com/other/thing.php don't do this:

html/
    app
        webroot/
    other/
         thing.php

Do this:

html/
    app
        webroot/
            other/
                thing.php

Upvotes: 2

Related Questions