By donladams on
I would like to navigate away from Wordpress to Drupal. I guess my biggest beef is that Drupal doesn't support a standard, easy to implement, long term solution to transparently run from a subdirectory. Will this feature every be supported by Drupal? I've searched the web and this forum, but I I've seem to see was trail and error experimentation that worked for some but not others. I would love to see a more tried and true method.
Comments
No problem for me
Hi, I have not had any problems running Drupal 5.x from a subdirectory. I haven't upgraded my site to Drupal 6.x yet.
My site is http://www.melbournecomputing.com.
I recommend you use the Path Filter module (http://drupal.org/project/pathfilter).
Thanks for your reply;
Thanks for your reply; however, I don't want the subdirectory to be visible as it is on your site.
what's the problem?
Which of the many available, working methods did you want?
Whether they work or not is up to your choice of host, that's why a few of them are work-arounds.
Subdirectory support is there for people who want to run drupal simply alongside other content.
If you want Drupal to take over your domain, don't do it in a subdir. Running Drupal over TOP of existing stuff pretty much makes them inaccessable ... unless you try other small (normal webserver config) work-arounds.
The real simple solution is to point http://your.domain/ to /your/web/files/
If you are choosing not to do that, then the redirects or rewrites are required.
If you choose to run drupal in a subdir, then it operates out of that subdir. Either choose not to, or use the rewrite recipes provided to fake it.
If its a test site or legacy support you are trying to achieve, have you investigated if your host supports subdomaining? They can do it for free if they like ... but some just don't know how.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
The problem is...
I want to run it out of a subdirectory because I have other files and folders in the root and would like to keep them separate and things orderly. However, I want it accessible from the root directory. Since you asked, the problem is that there may or may not be unknown side effects with the hack together methods. They all are hacks and workarounds, and I rather a supported method to be sure that nothing will break are cause unforeseen problems in the future. This is a feature that many others are looking for, yet I don't see any solid or official fixes for.
I'll guess I'll stick with Wordpress or will migrate to ExpressionEngine2.0 until something comes along. Thanks
Yep, but everyone's requirement is different.
The workarounds are there precisely because you are wanting to do something custom to your personal requirements.
The simple solutions (howto run drupal from a subdirectory) are only simple until you add your own changes to the way things work. Naturally is that code in a subdir - runs from the subdir.
It's possible (and widespread enough) for a few lines of rewrite rule (as documented) to pretend that everything under your webroot is actually served by a subdirectory.
I call that approach a work-around already, but that's what you are asking for.
Next.. what do you expect to get from http://yoursite.com/archive ?
Is that a Drupal path? Could be. Or could be a folder of your legacy stuff you wish to serve, from the top-level, not the Drupal-relative directory.
If Drupal owns the site, maybe it should be a 404. Or maybe you'll want to create an alias under Drupal and expect that to be served.
Or if it's a path of your other stuff, do you have directory browsing enabled for that path? Or would you rather require a defaultDocument? If a page there links to a relative path, should Drupal catch that request?
If you have an image served from http://yoursite/misc/logo.gif - do you mean the image in /var/www/misc/logo.gif or the one in /var/www/drupal/misc/logo.gif ?
You have the choice. But you have to make that choice. You can even choose to say 'both' :-)
And thus the generic solution you think should exist is actually a bit of custom tweaking of your webserver to your requirements. And this is why the recipes you see in the documentation vary a bit with instructions for various use-cases. No one-size-fits all, except for the default cases.
If you can see the recommendations for what they are, you may find out that the vagueness is indicative of the choice you have. You'll get some cool ideas about how Apache can be used.
Note ... all the above is actually about Apache configs, and not a Drupal issue at all :-)
I was not aware that Wordpress can run in a subdirectory, yet pretend to be in the webroot, and have custom URLs, without interfering with other paths, or having any .htaccess tweaks. I can imagine how it can be done, so it's certainly not impossible. Who wins when Wordpress and file paths conflict? It can probably even be done for Drupal with three lines in index.php if you really wanted to. But that would certainly be a 'work-around' :-}
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards