Title: raymor's Replies | WordPress.org

---

# raymor

  [  ](https://wordpress.org/support/users/raymor/)

 *   [Profile](https://wordpress.org/support/users/raymor/)
 *   [Topics Started](https://wordpress.org/support/users/raymor/topics/)
 *   [Replies Created](https://wordpress.org/support/users/raymor/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/raymor/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/raymor/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/raymor/engagements/)
 *   [Favorites](https://wordpress.org/support/users/raymor/favorites/)

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Supercache can be ten times faster by using sane rewrite syntax](https://wordpress.org/support/topic/supercache-can-be-ten-times-faster-by-using-sane-rewrite-syntax/)
 *  Thread Starter [raymor](https://wordpress.org/support/users/raymor/)
 * (@raymor)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/supercache-can-be-ten-times-faster-by-using-sane-rewrite-syntax/#post-3706422)
 * > I’m not convinced your analysis of /*$ is correct though. Doesn’t that match
   > anything, whether it ends with a / or not? I’m thinking the rule is trying 
   > to say match anything that ends with a slash, OR match ^$ I have no idea what
   > scenario the double-slash rule is trying to match.
 * I think you’re right, I applied the not operator (!) in the wrong order. It says“
   don’t match it if it ends with something other than a slash”, doesn’t it?
 * The old pattern was:
    `! ^.*[^/]$`
 * ^.* = Start with any characters, or none. That’s meaningless, so we’ll remove
   it and we have:
    `![^/]$`
 * ! means “don’t match”. [^] means “any character other than a slash”. $ means “
   at the end”. So we have:
 * `Don't match any character other than a slash, at the end`
 * Getting rid of the negative:
    `Match if it's a slash at the end, or nothing at
   all at the end.`
 * So I now think the best we can do is to just get rid of the meaningless ^.* and
   use:
    `![^/]$`
 * Does that sound right?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Supercache can be ten times faster by using sane rewrite syntax](https://wordpress.org/support/topic/supercache-can-be-ten-times-faster-by-using-sane-rewrite-syntax/)
 *  Thread Starter [raymor](https://wordpress.org/support/users/raymor/)
 * (@raymor)
 * [13 years ago](https://wordpress.org/support/topic/supercache-can-be-ten-times-faster-by-using-sane-rewrite-syntax/#post-3706335)
 * The difference in the speed _of the .htaccess_ is huge* – somewhere between 10
   and 100 times. That matters when it hits the cache, meaning it doesn’t run any
   PHP. On the other hand. when it doesn’t hit the cache and it runs thousands of
   lines of PHP, the rewrite isn’t significant compared to the PHP.
 * I haven’t benchmarked it, but knowing the C code that it runs, there’s a huge
   difference in how many lines of code are run, and how many times key lines are
   repeated.
 * I’ll be actually testing a new installation, with the skip rules, in the next
   2-36 hours so I can confirm there are no typos. Shortly after posting above, 
   I did realize I had one error. This:
 * `!^.*[^/]$`
 * Should become:
    `/*$`
 * I was wrong when I said:
    `/$`
 * The difference being the case where it’s empty, there’s no slash `or any other
   characters`. (Just mydomain.com)
 * * The “huge” speed difference mostly matters only if you care about speed / load,
   of course. It’s not nearly the slowest thing in WordPress, by a long shot, but
   people use WP Supercache _because_ speed / load matters to them. In an application
   like MS Word, other slowness would dwarf this difference.
 * I’ll try to remember to follow up after this new site is tested. I’ve worked 
   on the WPSC .htaccess before, but didn’t save it.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Supercache can be ten times faster by using sane rewrite syntax](https://wordpress.org/support/topic/supercache-can-be-ten-times-faster-by-using-sane-rewrite-syntax/)
 *  Thread Starter [raymor](https://wordpress.org/support/users/raymor/)
 * (@raymor)
 * [13 years ago](https://wordpress.org/support/topic/supercache-can-be-ten-times-faster-by-using-sane-rewrite-syntax/#post-3706102)
 * The wrong thing got pasted. The complete set should be:
 *     ```
       # BEGIN WPSuperCache
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       #If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
       AddDefaultCharset UTF-8
       RewriteCond %{REQUEST_URI} /$
       RewriteCond %{REQUEST_URI} !//
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !=
       RewriteCond %{HTTP:Cookie} !(comment_author_|wordpress_logged_in|wp-postpass_)
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP_USER_AGENT} !(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800) [NC]
       RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-) [NC]
       RewriteCond %{HTTP:Accept-Encoding} gzip
       RewriteCond %{HTTPS} on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
       RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]
   
       RewriteCond %{REQUEST_URI} /$
       RewriteCond %{REQUEST_URI} !//
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !=
       RewriteCond %{HTTP:Cookie} !(comment_author_|wordpress_logged_in|wp-postpass_)
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP_USER_AGENT} !(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800) [NC]
       RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-) [NC]
       RewriteCond %{HTTP:Accept-Encoding} gzip
       RewriteCond %{HTTPS} !on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
       RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]
   
       RewriteCond %{REQUEST_URI} /$
       RewriteCond %{REQUEST_URI} !//
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !=
       RewriteCond %{HTTP:Cookie} !(comment_author_|wordpress_logged_in|wp-postpass_)
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP_USER_AGENT} !(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800) [NC]
       RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-) [NC]
       RewriteCond %{HTTPS} on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -f
       RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]
   
       RewriteCond %{REQUEST_URI} /$
       RewriteCond %{REQUEST_URI} !//
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !=
       RewriteCond %{HTTP:Cookie} !(comment_author_|wordpress_logged_in|wp-postpass_)
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP_USER_AGENT} !(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800) [NC]
       RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-) [NC]
       RewriteCond %{HTTPS} !on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
       RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
       </IfModule>
   
       # END WPSuperCache
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Too Many Redirects / Canonical Problem?](https://wordpress.org/support/topic/too-many-redirects-canonical-problem/)
 *  [raymor](https://wordpress.org/support/users/raymor/)
 * (@raymor)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/too-many-redirects-canonical-problem/#post-1476540)
 * >  1. We used to have the site at [http://www.cgblog.org](http://www.cgblog.org),
   > but for efficiency I’ve opted to drop the www. on the new site, and have .htaccess
   > configured to redirect accordingly:
   >  … Is this something I’m doing wrong with
   > our site, or is this a problem with WP’s handling of canonical URLs?
 * That’s one of about 25 different things that cause
    “canonical redirects” to 
   explode.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress Mobile Pack - Mobile Plugin for Progressive Web Apps & Hybrid Mobile Apps] [Plugin: WordPress Mobile Pack] Conflict with WordPress' canonical redirects](https://wordpress.org/support/topic/plugin-wordpress-mobile-pack-conflict-with-wordpress-canonical-redirects/)
 *  [raymor](https://wordpress.org/support/users/raymor/)
 * (@raymor)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-mobile-pack-conflict-with-wordpress-canonical-redirects/#post-1790363)
 * Canonical redirects break a LOT of things even when using
    mature desktop browsers,
   so I’m sure they cause even more problems on mobile browsers, some of which are
   about as developed as IE 2.0.
 * Some of the bigger problems you see on all browsers
    are:
 * Breaks if your site is accessible via https as well as http.
    Breaks anything
   that uses cookies and is accessible as [http://www.site.com](http://www.site.com)
   and site.com. Breaks PHP sessions in many cases. Breaks load balancing such as
   www1.site.com and www2.site.com I could go on and on, requiring the use of fully
   qualified URLs via the redirect or the new “validation” of the base URL just 
   really screws up a lot of things.
 * On the other hand, it does help your Google rank, but only
    in the land of fairy
   tales. In the real world, Google already assumes that [http://www.site.com](http://www.site.com)
   and site.com are the normally the same. So the actual benefit is .. nothing. 
   Just a huge pain in the rear, causing all sorts of incompatibilities, for no 
   reason at all.
 *   Forum: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
   
   In reply to: [Don’t save fully qualified domains in the database](https://wordpress.org/support/topic/dont-save-fully-qualified-domains-in-the-database/)
 *  [raymor](https://wordpress.org/support/users/raymor/)
 * (@raymor)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/dont-save-fully-qualified-domains-in-the-database/#post-1440218)
 * You have the same problem if your site is accessible via https,
    or uses cookies
   and is accessible as [http://www.site.com](http://www.site.com) and site.com,
   and with PHP sessions, and with load balancing such as www1.site.com and www2.
   site.com, and a dozen other things. Requiring the use of fully qualified URLs
   just really screws up a lot of things.
 * On the other hand, it does help your Google rank, but only
    in the land of fairy
   tales. In the real world, Google already assumes that [http://www.site.com](http://www.site.com)
   and site.com are the normally the same. So the actual benefit is .. nothing. 
   Just a huge pain in the rear, causing all sorts of incompatibilies, for no reason
   at all.

Viewing 6 replies - 1 through 6 (of 6 total)