Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] htaccess.txt RewriteRule [R] [C-Chris]
This user has been denied support. This user has been denied support.
The MyBB htaccess.txt contains rewrite rules like this:

RewriteRule ^thread-([0-9]+).html

Rewrite Rules are regular expressions, so the ^ matches beginning of the line (beginning of the URL). Unfortunately this also means that . of .html matches any character, and since $ end of the line (end of the URL) is missing this means it will match URLs such as this:

To fix, in all rewrite rules, replace .html with \.html$, for example:

RewriteRule ^thread-([0-9]+)\.html$

This way it will only match URLs that actually end with .html
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group

Forum Jump:

Users browsing this thread: 1 Guest(s)