Welcome to WebmasterWorld Guest from 54.147.134.218

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

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

Junior Member

joined:May 3, 2011
posts:75
votes: 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.
4:15 pm on Dec 19, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 28, 2004
posts: 134
votes: 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...
5:34 am on Dec 20, 2011 (gmt 0)

Junior Member

joined:May 3, 2011
posts:75
votes: 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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members