We have a copy of our pre-Drupal HTML site and would now like to resurrect a portion of it. Is it possible to have a plain HTML site as a sub-site of the Drupal site? I have done it the other way around, so I suspect it is possible. Are there any gotchas I need to be aware of (other than Apache redirects that have to be removed)? Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
We have a copy of our pre-Drupal HTML site and would now like to resurrect a portion of it. Is it possible to have a plain HTML site as a sub-site of the Drupal site? I have done it the other way around, so I suspect it is possible. Are there any gotchas I need to be aware of (other than Apache redirects that have to be removed)?
Nope, it’ll work fine - I have many non-Drupal subsites in my Drupal install. The biggest gotcha will be ensuring that your mod_rewrite rules (in .htaccess) are working properly - if they’re not, then Drupal will try to take over ALL URLs (whether they exist on the filesystem or not). You can test that pretty easily by just creating dummy/whee.html and making sure you can access it right now, without Drupal interfering. -- Morbus Iff ( morbus == grumblestiltskin ) http://www.disobey.com/ and http://www.disobey.com/wiki/ twitter: @morbusiff / skype: morbusiff / irc.freenode.net, Morbus An O'Reilly author and blogger: http://www.oreillynet.com/pub/au/779
I don't think Apache redirects would even need to be removed unless you want a custom 404 page. The '-d' and -f' flags tell the rewrite rule to ignore any real files. I'm not sure how a subdirectory with an implied index.html would work, the '-d' rule might catch that as well. I've often mixed in test php and html files with a drupal site with no problem. -Don- On 1/12/2011 10:46 AM, nan wich wrote:
We have a copy of our pre-Drupal HTML site and would now like to resurrect a portion of it. Is it possible to have a plain HTML site as a sub-site of the Drupal site? I have done it the other way around, so I suspect it is possible. Are there any gotchas I need to be aware of (other than Apache redirects that have to be removed)?
/*Nancy*/
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
I should clarify that one. There are many, many redirects, possibly no longer needed) from the old site to the new one because there are search engines and other sites that point to the old addresses. Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr. ________________________________ From: Don I don't think Apache redirects would even need to be removed unless you want a custom 404 page. The '-d' and -f' flags tell the rewrite rule to ignore any real files.
As other posters have mentioned, keeping the files in another directory and redirecting using rules in mod_rewrite is usually the most maintainable route. Chris On 13/01/2011, at 3:24 AM, nan wich wrote:
I should clarify that one. There are many, many redirects, possibly no longer needed) from the old site to the new one because there are search engines and other sites that point to the old addresses.
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Don
I don't think Apache redirects would even need to be removed unless you want a custom 404 page. The '-d' and -f' flags tell the rewrite rule to ignore any real files.
Hi Nancy, I have done this keeping the old website files in a separate folder and adding that folder to the domains vhost configuration. You can then use mod_rewrite to check the domain and if it matches a pattern you specify, try to serve the content from the newly added directory, otherwise let Drupal try to serve the content. The only gotchas I have run into is that certain path modules have been created to only handle Drupal paths (i.e. the XML Sitemap module). You can also do it by placing the files in the Drupal root folder. This is easier but more messy to maintain. The http server will try to locate the file and if it finds it, serve the file. Otherwise a 404 will occur at which point Drupal will try to serve the path. -- Cheers, Antoine On Wed, Jan 12, 2011 at 7:46 AM, nan wich <nan_wich@bellsouth.net> wrote:
We have a copy of our pre-Drupal HTML site and would now like to resurrect a portion of it. Is it possible to have a plain HTML site as a sub-site of the Drupal site? I have done it the other way around, so I suspect it is possible. Are there any gotchas I need to be aware of (other than Apache redirects that have to be removed)?
*Nancy*
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
Jon Antoine wrote:
The only gotchas I have run into is that certain path modules have been created to only handle Drupal paths (i.e. the XML Sitemap module).
To clear some possible confusion: XML Sitemap module provides a sub-module to allow you to add custom URL so that your static pages can be added. -- Earnie -- http://progw.com -- http://www.for-my-kids.com
My apologies for the confusion Earnie. Yes, the XML Sitemap is a fantastic module and includes a sub-module that allows you to define custom URLs. The issue I ran into is that the XML Sitemap Custom sub-module attempts to verify all the custom URL paths you enter. This doesn't work very well when the physical path to the static file from the Drupal root is "../ example.com/test.htm" and your rewrite rules map the " http://example.com/test.htm" URL to the file. Using the physical path above with the XML Sitemap Custom module, the URL produced in the sitemap.xml file is "http://example.com/example.com/test.htm" (adds the full path of the file to the URL). I am only aware of this issue when you include files from a directory outside the Drupal root using rewrite rules and want them to appear at the root of the website. Again, sorry for the confusion. -- Cheers, Antoine On Thu, Jan 13, 2011 at 4:45 AM, Earnie Boyd <earnie@users.sourceforge.net>wrote:
Jon Antoine wrote:
The only gotchas I have run into is that certain path modules have been created to only handle Drupal paths (i.e. the XML Sitemap module).
To clear some possible confusion: XML Sitemap module provides a sub-module to allow you to add custom URL so that your static pages can be added.
-- Earnie -- http://progw.com -- http://www.for-my-kids.com
participants (6)
-
Chris Skene -
Don -
Earnie Boyd -
Jon Antoine -
Morbus Iff -
nan wich