Search code examples
apache.htaccesshttp-redirectdrupalurl-rewriting

Drupal page with non-Drupal microsites off same path


I'm trying to figure out what sort of htaccess rules or directory setup I need to have a Drupal page created with page manager and separately have a collection of static pages or micro-sites off of the same path.

For example, I'd like to have example.com/parent as a Drupal panels page created with page manager. I'd then like to have example.com/parent/microsite-1, example.com/parent/microsite-2, etc., as non-Drupal pages.

Right now I have the parent directory in the root of my Drupal installation and I get a 403 when trying to access the page, but I can access the micro-sites. Is this setup possible, or do I need to rename the parent directory and set up redirects?

I have the default Drupal htaccess file in place with the following setting preventing the current parent directory from listing the contents:

    # Don't show directory listings for URLs which map to a directory.
    Options -Indexes

Update re: accepted answer

I've added the following alias to httpd.conf:

Alias /parent/microsite-1 /path/to/drupal/root/microsite-directory/microsite-1

My microsites now live in Drupal root under microsite-directory, and are accessible, as is the Drupal page example.com/parent.


Solution

  • Perhaps what you are looking for is the Apache Alias directive

    Something like the following should work:

    Alias /parent/microsite-1 /path/to/microsite/root
    

    However, that does not work on .htaccess context. For that to work, you could try simply putting the microsites inside of the Drupal folder (which I would not recommend), or use a symbolic link from within Drupal to said microsite folders.