RewriteRule inflicting inside redirect restrict error

I’m attempting to server a static HTML web site from /websites/default/recordsdata/staticsite and make it accessible through a subdomain. I am internet hosting Drupal Development Service web site on Acquia Cloud, and their docs describe Sustaining a static microsite alongside Drupal’s docroot.

This answer is working, with Drupal Development Service exception of index.html web page (homepage) which returns a 404.

  • http://subdomain.instance.com/ returns a 404
  • http://subdomain.instance.com/index.html success

Drupal Development Service setup describe in Drupal Development Service docs

I’ve added Drupal Development Service required area to my Acquia Cloud dashboard so Drupal Development Service server will settle for requests for Drupal Development Service subdomain.

I’ve up to date docroot/.htaccess with Drupal Development Service following RewriteRule to redirect requests to Drupal Development Service static recordsdata. Drupal Development Service following guidelines are Drupal Development Service first traces in Drupal Development Service .htaccess file.

<IfModule mod_rewrite.c>   RewriteEngine on   # Solely serve Drupal Development Service static web site for a specific host.   RewriteCond %{HTTP_HOST} ^subdomain.instance.com.au$ [OR]   RewriteCond %{HTTP_HOST} ^dev-subdomain.instance.com.au$ [OR]   RewriteCond %{HTTP_HOST} ^stage-subdomain.instance.com.au$   # Do not loop something concentrating on Drupal Development Service precise masks listing, to permit   # for linked scripts, stylesheets and so on in Drupal Development Service static HTML   RewriteCond %{REQUEST_URI} !^/websites/default/recordsdata/staticsite/   #Any requests that made it this far are served from Drupal Development Service /staticsite/ listing   RewriteRule ^(.*)$ /websites/default/recordsdata/staticsite/$1 [PT,L] </IfModule> 

Drupal Development Service recordsdata have been uploaded to websites/default/recordsdata/staticsite

Issues I’ve tried

I believed DirectoryIndex should be disabled for these directories so I attempted including DirectoryIndex index.html in each /websites/default/recordsdata and /websites/default/recordsdata/staticsite however neither have had an impact.

I attempted elevating Drupal Development Service DirectoryIndex directive to Drupal Development Service high of Drupal Development Service current /websites/default/recordsdata/.htaccess file, in addition to putting it final. Neither mounted Drupal Development Service 404 error.

I’ve tried eradicating Drupal Development Service /websites/default/recordsdata/.htaccess and including a brand new .htaccess file with simply DirectoryIndex index.html to check if Drupal Development Service SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006 was impacting issues. No change nonetheless acquired 404.

I’ve tried including Drupal Development Service [END] flag to Drupal Development Service RewriteRule to cease Drupal Development Service present rewrite course of and subsequent rewrite processes, however nonetheless acquired Drupal Development Service 404.

Log entries

When making a request to `http://subdomain.instance.com/ I see Drupal Development Service following entry in Drupal Development Service Apache error log:

Request exceeded Drupal Development Service restrict of 10 inside redirects because of possible configuration error. Use ‘LimitInternalRecursion’ to extend Drupal Development Service restrict if essential. Use ‘LogLevel debug’ to get a backtrace.

I am unable to outline ‘LogLevel` as a result of Acquia Cloud don’t present entry to Drupal Development Service server config, digital host, and listing contexts which this directive may be outlined in.

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

RewriteRule inflicting inside redirect restrict error

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.