Posted by one_hoopy_frood on March 21, 2012 at 12:09am
Hey gang. Long time DrupalPGH stalker ... recent poster.
I have a site foo.third.main.ext .
I need to make an 'application' section of the site, and would like to just stick it into the folder foo.third.main.ext/apply .
Is there any reason Drupal can't do this?
What would the complete URL look like if I I put it in a subdirectory of the root?
foo.third.main.ext/apply ?
And things like
foo.third.main.ext/apply/[path] where [path] is set in nodes?
Thanks. Just need to implement this without modifying the rest of the static site until other people I'm waiting on sort their stuff out.
Thanks oodles. Looking forward to making an appearance at a DrupalPGH meetup n-next month.
-Chris
Comments
Are you talking about running
Are you talking about running Drupal from a subdirectory like http://example.com/apply/? If so, Drupal can do this. If you do it this way, just upload the Drupal files to this /apply/ directory and make sure to set the $base_url variable in the settings.php file. The base_url area of that file is commented out, so un-comment the code and then add http://example.com/apply as the $base_url value. That way, stylesheets, JS files, and so on will load from the correct subdirectory. I believe there's also a setting in the .htaccess file that should be changed if you're running Drupal from a subdirectory.
All that said, the way I usually do it (if possible) is to create a subdomain (e.g. http://apply.example.com points to the http://example.com/apply/ directory). That way, you don't have to mess with the $base_url variable and you don't have to worry about making sure to hard-code all your links to /apply/[path] in places where you're adding absolute links.
Let me know if this answers the question!
Nate
That's what I wanted to know, thanks!
I thought there might be something like base_url that would need to be tweaked. I'll give it a go.
Thanks!
-Chris
That's it! Glad to help.
That's it! Glad to help.
pointing with a subdomain
I installed drupal in a subdomain and it works but I encountered exactly the remark above that you have to relink files to /apply/[path] . The solution to create a subdomain that points to the http://example.com/apply/ directory sounds interesting. I tried for hours with the settings and htaccess without success, so I started with changing all the paths untill I saw this post. Is there a guideline to create this?
With friendly regards, Johan