Regex optimizations for web/.htaccess

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   |
| Fixed tickets | 
| License       | MIT
| Doc PR        | 

The idea is to not lose time matching things you don't need. So, instead of matching the whole URI with `.*` or even a single character via `.?`, you can just match the beginning of the string `^` and be done with it.

In the second regex, I created a non-capturing group `(?:___)` since that first match is not being referenced anywhere.