Welcome to WebmasterWorld Guest from 54.226.183.49

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

WordPress WP Super Cache mod rewrite Rules

Seems to me that these rules could be simplified or corrected

     

MickeyRoush

1:30 pm on Dec 19, 2011 (gmt 0)



Could I get your opinions on some of the aspects of the .htaccess rules that the WordPress plugin WP Super Cache utilizes?

They seem like they should be simplified and that the use of ".*" in certain places is not needed.

Example:
RewriteCond %{REQUEST_URI} !^.*[^/]$
Isn't that same as this:
RewriteCond %{REQUEST_URI} ![^/]$

More:
RewriteCond %{REQUEST_URI} !^.*//.*$
Same as:
RewriteCond %{REQUEST_URI} !//

RewriteCond %{QUERY_STRING} !.*=.*
Same as:
RewriteCond %{QUERY_STRING} !=

Below is a part of a line:
RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry).* [NC]
Same as:
RewriteCond %{HTTP_USER_AGENT} !(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry) [NC]

I guess what I'm trying to say, isn't the use of ".*" unnecessary in these instances?

Any opinions, insights, recommendations, are greatly appreciated.

rominosj

4:15 pm on Dec 19, 2011 (gmt 0)

10+ Year Member



But, why delete them if it is working fine?

Unless you have more than 3,000 lines in your htaccess file that is putting to much pressure on your server...

MickeyRoush

5:34 am on Dec 20, 2011 (gmt 0)



But, why delete them if it is working fine?

Unless you have more than 3,000 lines in your htaccess file that is putting to much pressure on your server...


Because working just fine and working most efficiently (or correctly) are two different things. If there is one thing that I've learned from these forums, is that there are things you would be better off doing. And using the ".*" everything atom is definitely one of them.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month