Example of mod_dir conflict, exposing rewritten file-path. Use of env var to avoid repetition.
Redirecting URLs containing one of 50 US state names to the corresponding URL with the state "code" (not in the original URL). Solution uses just a single rule and series of conditions to act as the lookup table for state codes.
https://stackoverflow.com/questions/55504017/how-to-301-a-url-without-a-query-string-to-a-different-url-with-a-query-string / my answer
Looking up an "ID" from a
RewriteMapwhich is used in two places in the source and target URLs.
Biggest misunderstandings of CSS [DELETED 2010!]
Reordering/canonicalising URL parameters using
Includes an explanation of when
REQUEST_FILENAME(Apache server variable) is calculated
- https://stackoverflow.com/questions/20090207/remove-cpanel-login-pages-from-the-google-index (would have been on-topic on Webmasters SE) - Question answered 16-May-2014, closed and deleted on 24-May-2023 (9 years later)
Potential security vulnerability using "vulnerable" mod_rewrite directives in the server config. [Why CLOSED?] https://serverfault.com/questions/1091045/how-to-prevent-apache-rewriterule-from-accessing-root-path
Negated blocking rule being applied due to a front-controller pattern later in the
.htaccessfile. A relatively common trap. I give 3 solutions. https://serverfault.com/questions/1140684/rewrite-apache-condition-not-preventing-rewrite-from-getting-applied
Search and replace all occurrences of
-(hyphen) in a specific URL parameter with
+(encoded space) using just a single redirect in
.htaccess. (Although this should arguably be resolved in the application, not Apache/
Other/past usernames: w3d / w3dk / penders / MrWhite