Apache redirect sample code update

Created on 22 July 2024, 4 months ago

I'm not sure if I missed something in the configuration of this module, but I had update the sample Apache redirect rule to include Drupal specific url's from NOT adding the trailing slash because otherwise visiting a Drupal specific url resulted in a never ending redirect loop since Drupal removes trailing slashes by default. Here is the code I had to implement.

RewriteBase /
  RewriteCond %{REQUEST_METHOD} !=post [NC]
  RewriteCond %{REQUEST_URI} !^/admin/
  RewriteCond %{REQUEST_URI} !^/user/
  RewriteCond %{REQUEST_URI} !^/node/
  RewriteCond %{REQUEST_URI} !^/batch
  RewriteRule ^(.*(?:^|/)[^/\.]+)$ $1/ [L,R=301]

Is this normal or did I missing something in the configuration?

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bobthebuilder

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024