Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(16727)

Issue 4430062: Joomla master .htaccess - differences 2.4.8 - 3.3.b

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by g1smd
Modified:
13 years ago
Reviewers:
nikosdion
Base URL:
http://joomla-master-htaccess.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Based on the version 2.3 code originally found at: http://snipt.net/nikosdion/the-master-htaccess/ and now listed at: http://code.google.com/p/joomla-master-htaccess/source/browse/trunk/joomla-master-htaccess.txt?spec=svn2&r=2 The original file contains a number of syntax errors, several rules that can never work, and a number of expressions that can be more efficiently coded. Bugs and enhancements originally discussed at: http://forum.joomla.org/viewtopic.php?f=432&t=549841 Discussion also at: http://snipt.net/nikosdion/the-master-htaccess/ The new 2.4.8 proposed file: http://snipt.net/g1smd/joomla-master-htaccess-file-proposed-v24-2011-04-16/ or at: http://code.google.com/p/joomla-master-htaccess/source/browse/trunk/joomla-master-htaccess.txt?spec=svn4&r=30 NOTE: this is not now the latest version of the file. Continued in: http://codereview.appspot.com/4528051/

Patch Set 1 #

Total comments: 19
Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -44 lines) Patch
joomla-master-htaccess.txt View 17 chunks +58 lines, -44 lines 19 comments Download

Messages

Total messages: 1
g1smd
13 years ago (2011-04-23 17:00:09 UTC) #1
http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt
File joomla-master-htaccess.txt (left):

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#oldco...
joomla-master-htaccess.txt:220: ########## End - Redirect (www.)olddomain.com to
www.example.com
Add (www.) to oldomanin.com on RHS.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#oldco...
joomla-master-htaccess.txt:331: RewriteCond %{QUERY_STRING}
\=PHP[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [NC]
This is a hexadecimal match: [0-9a-f] [NC].

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#oldco...
joomla-master-htaccess.txt:406: RewriteCond %{REQUEST_URI}
/component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw|ini|zip|json|file))$ [NC]
vcf is after pdf and before raw in the official files.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt
File joomla-master-htaccess.txt (right):

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:85: #  Uncomment following line if your webserver's
URL
Spaces to remove!

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:86: #  is not directly related to physical file
paths.
Spaces to remove!

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:87: #  Update Your Joomla! Directory (just / for
root)
Spaces to remove!

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:236: ########## End - Redirect olddomain.com to
www.example.com
Add (www.) to oldomanin.com on RHS.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:286: ## These are sample exceptions to the Advanced
Server Protection 3.0
The code is much altered since August 2010. The 3.0 tag is now incorrect.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:314: #RewriteRule ^tmp/ $1 [L]
The $1 is a typo. Should be - (hyphen).

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:321: # Advanced server protection, version 2.0 -
August 2010
The code is much altered since August 2010. The 2.0 tag is now incorrect.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:328: RewriteRule
^images/stories/.*\.(jp(e?g|2)?|png|gif|bmp|css|js|swf|ico)$ - [L]
The .* is inefficient. ([^/]+/)*([^/.]+\.)+ will recurse zero or more folders
followed by filename with one or more periods.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:346: RewriteCond %{QUERY_STRING}
\=PHP[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12} [NC]
This is a hexadecimal match: [0-9a-f] [NC].

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:354: RewriteRule
^administrator/(components|modules|templates|images|plugins)/.*\.(jp(e?g|2)?|png|gif|bmp|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov)$
- [L]
The .* is inefficient. ([^/]+/)*([^/.]+\.)+ will recurse zero or more folders
followed by filename with one or more periods.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:366: RewriteRule
^(components|modules|plugins|templates)/.*\.(jp(e?g|2)?|png|gif|bmp|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov)$
- [L]
The .* is inefficient. ([^/]+/)*([^/.]+\.)+ will recurse zero or more folders
followed by filename with one or more periods.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:370: # RewriteRule
^(components|modules|plugins|templates)/.*(index\.php)?$ - [L]
The .* is inefficient. ([^/]+/)* will recurse zero or more folders.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:373: # RewriteRule ^templates/.*\.php$ - [L]
The .* is inefficient. ([^/]+/)*([^/.]+\.)+ will recurse zero or more folders
followed by filename with one or more periods.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:381: RewriteRule ^.*\.php$ - [F]
The .* is inefficient. Also the comment says "root" but .* allows root and any
level of folders in the tree. ^([^/.]+\.)+ will recurse filename with one or
more periods for root only.

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:383: ## Disallow access to htaccess.txt and
configuration.php-dist
and php.ini

http://codereview.appspot.com/4430062/diff/1/joomla-master-htaccess.txt#newco...
joomla-master-htaccess.txt:420: RewriteCond %{REQUEST_URI}
/component/|(/[^.]*|\.(php|html?|feed|pdf|raw|ini|zip|json|file|vcf))$ [NC]
vcf is after pdf and before raw in the official files.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b