'htaccess rewrite rule problems
We moved some html files off a server into Drupal.
I initially thought I could write a simple .htaccess pattern to both redirect users from the base page, in addition to moving them from the individual pages using this pattern.
The URL pattern for the Drupal pages are /building/(acronym) for example /building/ai
Redirect 301 /map/bldgs/ https://www.example.com/buildings
RewriteRule ^/map/bldgs/(.*)$ /building/$1 [R=301,L]
The redirect works like a charm. But the rewrite rule produces code that is missing the forward slash. For example: https://www.example.com/map/bldgs/bc goes to https://www.example.com/buildingbc
it is not adding the / between building and the bc (building acronym).
I thought the rules may be conflicting with each other, but when I removed the working redirect code, the rewrite rule still does not resolve as expected.
Suggestions?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
