Forums

[resolved] [Plugin: WP Super Cache] Accepted Filenames & Rejected URIs (6 posts)

  1. SAnton
    Member
    Posted 3 years ago #

    I added ".h" (without quotes) to the list, because it corrupted my .h files (added "<!-- Dynamic Page Served (once..." to the end of file).

    And now ALL files which contain "h" letter are not cached :(

  2. SAnton
    Member
    Posted 3 years ago #

    I want to say "all files which PERMALINK contains letter h"

  3. SAnton
    Member
    Posted 3 years ago #

    More precise: it adds
    <!-- Page not cached by WP Super Cache. No closing HTML tag. Check your theme. -->
    To the end of every file like myPaper.pdf, myProgram.cpp and others which people can download from my site. I added

    .h
    .zip
    .pdf

    to the list of forbidden URIs for caching, but now all pages which contain letter 'h' in their name are not cached too :(

  4. SAnton
    Member
    Posted 3 years ago #

    I have solved the problem: these strings are regular expressions. So, the dot symbol matches any char!

    So, the default values (like "wp-.*.php") are incorrect: it should be "wp-.*\.php". This was the first bug in WP-Super-Cache.

    The second bug was in the source code that prevented from entering backslashes in the list.

  5. SAnton
    Member
    Posted 3 years ago #

    The correct rejected URIs are:

    wp-.*\.php
    \.(?!php)

    The correct allowed URIs are:

    wp-comments-popup\.php
    wp-links-opml\.php
    wp-locations\.php
  6. cindr
    Member
    Posted 3 years ago #

    Thanks this whas very helpfull.

Topic Closed

This topic has been closed to new replies.

About this Topic