5

I've created a site that is currently partly static while partly managed in Drupal.

I've managed to rewrite static HTML by specifying the /static directory in the following manner above Drupal's .htaccess code.

RewriteEngine on
RewriteRule ^about-us/(.*) static/about-us/$1 [L]

Though I now have a dilemma. I have a directory page which is static:

website.com/products

but then the next level needs to go through the Drupal system:

website.com/products/product-type

to add to complication the next level then should go back to the static directory:

website.com/products/product-type/product

Is this possible? And if so how would you achieve it?

Notes

Please note that these do not need to be dynamic. Can easily declare 'product-type' as there will only be 3. It would be good if I didn't have to declare 'product' because there will be multiple under each 'product type'.

My temporary fix was to just use a different directory in the URL. I added 's' to 'product-type' (website.com/products/product-types) for that specific page, and then at product level went back to remove the s (website.com/products/product-type/product)

2
  • Personally I would make it all Drupal and use Boost to make it as fast as static page.
    – Mołot
    Commented Jul 29, 2013 at 6:39
  • That is the long term plan. Commented Jul 29, 2013 at 10:48

1 Answer 1

1

Look at Drupal's .htaccess, lines 110 to 113:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

It means if you create directory "products", every static file that's there will be served and all the rest will be directed to Drupal. Simple as this. If it's not working for you, you need to provide more details or fill a bug report.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.