WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
What does "Rewrite URL structure" do? (4 posts)

  1. photon-x
    Member
    Posted 2 years ago #

    What does Minify>Rewrite URL structure do, actually?
    And, how does it relate to the end slash issue (.com/) ?

    I have tried extensive searching to understand this, but I've found nothing that speaks to any details.

    Thanks.

  2. tgeorge
    Member
    Posted 2 years ago #

    What does Minify>Rewrite URL structure do, actually?

    I am not the developper, but I will try to respond to the best of my knowledge. When "Rewrite URL structure" is disabled, the URL of minified CSS and JS files looks like this:

    wp-content/w3tc/min/index.php?file=whatever.css
    wp-content/w3tc/min/index.php?file=whatever.js

    When "Rewrite URL structure" is enabled, the following line is added in wp-content/w3tc/min/.htaccess :

    RewriteRule ^(.+\.(css|js))$ index.php?file=$1 [L]

    This rewrite rule allows to hide the "index.php?file=" part, and to have a nice-looking URL for minified CSS and JS files :

    wp-content/w3tc/min/whatever.css
    wp-content/w3tc/min/whatever.js

    That's all.

    And, how does it relate to the end slash issue (.com/) ?

    I've never experienced such issue, so I can't help. It sounds unrelated.

  3. photon-x
    Member
    Posted 2 years ago #

    tgeorge,

    Thanks so much for the info. I really appreciate your explanation.

    The trailing slash issue has thrown me with hundreds of 404 errors, and duplicate content listings.

    One of the threads dealing with it is:
    http://wordpress.org/support/topic/plugin-w3-total-cache-disk-enhanced-page-caching-impossible-wo-permalink-trailing-slash?replies=22

  4. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    Commented on the thread @photon-x linked to.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic