S
S
Sergey2017-03-20 03:14:47
htaccess
Sergey, 2017-03-20 03:14:47

How to install wordpress and member in folders with OctoberCMS already installed?

Faced such a problem. There is a website with october cms installed. There are no complaints about the site, but you need to install a section with WordPress and a section with member.
On a similar project, but without Oktober, similar processes were solved simply by installing everything in folders. for example /folder1/ /folder2/ when accessed through the appropriate CMS was opened.
I don't know why, it seems to me that I need to
- dig towards htaccess but I have no idea about editing
or
- dealing with routers (oktober is based on laravel)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ablizin, 2017-09-07
@mcmraak

In OctoberCMS, at the .htaccess level, all php crypts are prohibited except for the index.php entry point, and this is correct from a security point of view. If you still need to open a directory for requests, then this is done like this:

##
    ## White listed folders
    ##
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} !/.well-known/*
    RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/.*
    RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.*
    RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.*
    RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*
    RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.*
    RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.*
    RewriteCond %{REQUEST_FILENAME} !/testfolder/.*
    RewriteRule !^index.php index.php [L,NC]

    ##
    ## Block all PHP files, except index
    ##
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} \.php$
    RewriteCond %{REQUEST_FILENAME} !/testfolder/.*
    RewriteRule !^index.php index.php [L,NC]

Here we have added the /testfolder/ directory to the allowed list for accessing php scripts, i.e. added the line
RewriteCond %{REQUEST_FILENAME} !/testfolder/.* in two places (see above)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question