0

I have a d7 site with static files under the docroot. (www.example.com/top-directory/sub-directory/file.php)

I want all of the pages to follow the '/top-directory/sub-directory' URL pattern, including a top level page at www.example.com/top-directory/sub-directory. However, that top level page has been created in the cms and has /top-directory/sub-directory as an alias. When I point my browser to www.example.com/top-directory/sub-directory, I am served a blank page because the site goes to the folder, when I actually want it to go to the node.

I believe this could be resolved using .htaccess, but the site is hosted on Pantheon, so I don't think .htaccess rules are going to help. I don't think that making the static pages into Drupal pages is an option either.

Is there a way to solve this problem?

  • I think you're out of luck. The decision to serve an existing file/folder instead of passing it over for rewriting is made by the web server (nginx in this case). That happens before PHP/Drupal can get involved. Since Pantheon don't offer any way to hook into the request before it reaches PHP, it's hard to imagine how you would accomplish this without getting Pantheon to adjust their nginx config – Clive Jul 18 at 11:42
  • Thanks, Clive, I think you are right. – Sarah Jul 24 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.