Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Multi-config in a subdirectory? #52

Open
ejaedesign opened this issue Apr 22, 2019 · 2 comments
Open

Using Multi-config in a subdirectory? #52

ejaedesign opened this issue Apr 22, 2019 · 2 comments

Comments

@ejaedesign
Copy link

ejaedesign commented Apr 22, 2019

I'm having trouble with getting the .htaccess correct when using multi-config in a subdirectory. Here's my directory set up:

/config
/config_site2
/public_html
-.htaccess
-/site2
--.htaccess
/system
/system_site2

I have two multi-config files in two directories above the root (/config and /config_site2) along with two system folders (/system and /sytem_site2).

In the /public_html folder, I have the subdirectory (/public_html/site2) that's correctly rendering site2.

I'm consistently getting 500 server error, however. Here's the .htaccess file for site2:

#------------------- remove trailing slash -------------------
RewriteCond %{REQUEST_URI} !^/system_site2 [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)/$ /$1$2 [R=301,L,QSA]
#------------------- index.php -------------------
#strip index.php from the URL if that is all that is given
RewriteCond %{REQUEST_URI} !^/site2/system_site2
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)index.php\ HTTP/
RewriteRule ^(([^/]+/)
)index.php$ https://%{HTTP_HOST}/site2/ [R=301,NS,L,QSA]
#strip index.php/* from the URL
RewriteCond %{THE_REQUEST} ^[^/]/site2/index.php/ [NC]
RewriteRule ^index.php/(.+) https://%{HTTP_HOST}/$1$2 [R=301,L,QSA]
#------------------- CE Cache Static Driver -------------------
RewriteCond %{REQUEST_URI} !^/system_site2 [NC]
RewriteCond %{QUERY_STRING} !ACT|URL [NC]
RewriteCond %{REQUEST_METHOD} !=POST [NC]
RewriteCond %{DOCUMENT_ROOT}/static/ce_cache/190328/static%{REQUEST_URI}/index.html -f
RewriteRule (.
) /_static_cache_handler.php%{REQUEST_URI}/index.html [L,QSA]
#------------------- EE -------------------
#rewrite all non-image/js/css urls back to index.php if they are not files or directories
RewriteCond $1 !.(css|js|gif|jpe?g|png) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /site2/index.php/$1 [L,QSA]

What am I overlooking? Thanks much in advance!

@erikreagan
Copy link
Member

Hey Jae! I'm afraid I won't be able to help figure this one out. We've not used EE in ages and we don't have the resources to help debug this.

I noticed you asked it on the EE Stack Exchange though. Best of luck getting some help from the broader EE community there. Wishing you the best!

@ejaedesign
Copy link
Author

ejaedesign commented Apr 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants