Current time: 02-07-2012, 05:27 AM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] htaccess.txt RewriteRule [R] [C-Chris]
02-27-2009, 12:30 PM (This post was last modified: 02-27-2009 12:32 PM by frostschutz.)
Post: #1
[F] htaccess.txt RewriteRule [R] [C-Chris]
The MyBB htaccess.txt contains rewrite rules like this:

Code:
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:

http://community.mybboard.net/thread-458...ated/stuff

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

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

This way it will only match URLs that actually end with .html

Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary
Visit this user's website Find all posts by this user
02-28-2009, 06:43 AM
Post: #2
RE: htaccess.txt RewriteRule
Reproducible.

Clicktotweet.me
Find all posts by this user
03-03-2009, 09:48 PM
Post: #3
[F] htaccess.txt RewriteRule [R]
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
Visit this user's website Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication