I am trying to homepage as <domain>/url_path, which Drupal allows via site configuration.

However how Drupal internally does it is by setting up url_path as homepage and a 301 redirect from url_path to /

Now what I am trying is to avoid this 301 redirect and open homepage as <domain>/url_path.

The reason it matters is because we have setup a logic to redirect request based on url_path to different cms so any request to <domain> will be served from non Drupal CMS and <domain>/url_path/* should go to Drupal and <domain>/url_path acts as kind of hompepage of subsite on Drupal but problem comes when Drupal redirects <domain/url_path> to <domain> and then request never comes back to Drupal since it get resolves via non Drupal cms via cloudflare rules.

I know the workaroound would be not to have url_path as front page but then I have to programmatically set site logo, breadcrumb Home link and <front> to act as <domain>/url_path

I am looking for a way to avoid <domian>/url_path redirect to <domain> which should in turn fix everything else.

  • 2
    This looks like you have a route normalizer installed, like for example the one included in the module Redirect. Independent of this it might be easier to solve this outside of Drupal by serving Drupal from the subdirectory url_path/. – 4k4 Sep 3 '18 at 20:57
  • You could edit the .htaccess file to create a redirect to your path, then you would also have to reset the Drupal homepage in the settings. However, this would have an impact on the site SEO. – Cesar Moore Sep 3 '18 at 21:42

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.