Posted by Carolina Tiger ... on March 2, 2014 at 7:47pm
I installed Drupal 7 on the same server as our e-commerce site. Our ecommerce vendor said this shouldn't cause any problems, and if it has, they've been easy to correct.
However, I created another folder in the root directory to add a page to our existing website (nonDrupal), and when I try to go to that page, it shows "Site under Maintenance".
I've tried modifying the .htaccess to exclude this folder, but can't get this to work
how do I tell Drupal this doesn't belong to it?
Comments
Have you created a page like
Have you created a page like newpage.html? What is the extension on the new page? And have you checked permissions on that directory, it sounds like you might be getting a 404 not found.
if there's a real file there Drupal should ignore it. I had problems with the Deny All that drupal wanted in the new /sites/default/files directory, but other than that I haven't noticed a difference. I do that all of the time to create test and migration scripts.
the file name is
the file name is register.php
I don't think it's a 404 error- because I get the Site under maintenance message (standard response from test site), and I do have a separate 404 file that works fine.
The directory structure looks like this:
-register.php
-themes
it's a php file
the file name is register.php
I don't think it's a 404 error- because I get the Site under maintenance message (standard response from test site), and I do have a separate 404 file that works fine.
The directory structure looks like this:
-register.php
-themes
notes
Like your e-commerce vendor suggests, this should not be a problem.
I did two quick tests:
create a simple html file in the root of a default drupal site
http://rootdirtest-skrinakcreative.rhcloud.com/1.html
-- works fine
And then create a simple php page within a subdirectory off the drupal root:
http://rootdirtest-skrinakcreative.rhcloud.com/snookums/phpinfo.php
-- works fine
No problems, as I expected.
Can you check your log files? It should show attempts by apache to serve from that location. I'm also wondering how your .htaccess is different from the Drupal default — or did the e-commerce software set the .htaccess file?
You didn't ask, but the problem with this workflow will be when it is time to update drupal. You might want to think about alternative ways to have your ecommerce and drupal directories separate.
ah- you know, I did update
ah- you know, I did update Drupal that last coworking day, and I've created the BigCatSafari directory since then, but I had another directory with working phps (I omitted for simplification)that I was working in just before the update. It's has been working fine.
I have the default .htaccess except I added a reference at the beginning for a 404.html file, and under ReWrite Engine On I called the BigCatSafari. I mostly tried some of the stuff here: http://www.thesitewizard.com/apache/access-non-drupal-folders.shtml
Well- if it's because of the update, what can I do?
What are you using for hosting?
Shared hosting, self-managed, or?
What are you using for hosting?
Shared hosting, self-managed, or?
don't cringe- it's godaddy.
don't cringe- it's godaddy. :)
I have some control over the settings through their web interface.
I think I'll try recreating the directory with a different name tomorrow when I get back to work and see how that goes
sounds like there's something
sounds like there's something funny in your .htaccess to me. Drupal should normally be called only if a real directory path and file can't be found. That's why i was thinking permissions, apache may not have read rights in that directory so it's the same as not being there.
if you want to post your .htaccess i can give it my best guess. there shouldn't be anything sensitive in there.
camelCase
have you tried NOT using camelCase for the directory name? dpickerel is right in saying that if Drupal is being invoked, then Apache does not thing the directory/file that you are asking for is part of the file system. Depending on the Apache setup, camelCase can present an issue in this respect.
Your first issue here is apache - Drupal should not be invoked at all if you request a directory/file combination that actually exists.
Do you happen to have CPanel,
Do you happen to have CPanel, especially under WHM? Ownership permissions are a real bugger because of the way they run each apache thread as its own owner. I think group permissions has to be "nobody" or nothing can be read. I think it's the mod_ruid2 module.
It's caused me a few sleepless nights. Now i only create files and directories in the ftp account to make sure i get them right.
new directory
The "new directory" strategy did not work. I created a new directory, BCSafari, in the html root, and oddly it displays the body of the file, but also includes the "site under maintenance"
http://savannastation.carolinatigerrescue.org/BCSafari/default.html - see for yourself (I would have expected one or the other, not both)
I use SSIs for the header and footer- these are not displayed on the link above.
my .htaccess- the only change I have made is the Rewrite condition for the BigCatSafari folder after ReWrite Engine On
You can see the hosting controls I might have to work with from this screencapture:
http://carolinatigerrescue.org/downloads/2014-03-04%20Godaddy%20hosting%...
what else shall I try?
DOH
I thought I'd been careful about this, but apparently the error is because Apache is case-sensitive. I had failed to include capitalization in my URL.
(hanging head in shame)
We've all done it...
I would recommend that you always use lowercase for everything and decide on whether you want to use hyphens or underscores for joins and then always do it the same way. Case sensitivity in Apache varies based on your environment, as does the ability to do things like interpolate camelCase to lower_underscore. Avoid confusion and name_all_your_directories_the_same_way ;-)