bug: some RewriteRules include unnecessary globs for query string

Open Beginner friendly
#361 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
apache
Domain
backend

Research direction

Start with the linked .htaccess lines 121-122 and review nearby RewriteRules for trailing globs that are intended only to match query strings. Simplify those path patterns while preserving the shown update route, then verify that paths beyond /update no longer match.

Written by the indexing model from the issue text.

Description

bug common/

For example, the following rule has a trailing .*, but query string is not included in the URL during match in mod_rewrite, so this can be eliminated. The trailing .* is messy and wrong -- we don't want to match any other paths other than .../update itself.

https://github.com/keymanapp/api.keyman.com/blob/2c6473a6abf361261ab700b43c8a1cfcfa05359b/.htaccess#L121-L122

For example:

# developer/14.0+/update
RewriteRule "^developer/[1-9][0-9]\.[0-9]/update(.*)" "/script/developer/14.0/update/index.php$1" [END]

Should simplify to:

# developer/14.0+/update
RewriteRule "^developer/[1-9][0-9]\.[0-9]/update$" "/script/developer/14.0/update/index.php" [END]
Dominant language
PHP
Stars
3
Forks
3
Avg merge
2d 4h
Merged PRs (30d)
6

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from keymanapp/api.keyman.com

All issues in keymanapp/api.keyman.com

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.