CEMBTW
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] Page redirecting in a loop until time out.Since “/treattrain” is in the URL of your desired location, the regex will always find “/treattrain” somewhere. Make sure it is at the beginning of the string to be replaced with something like the
^
token.Forum: Plugins
In reply to: [Redirection] Weird string causing 404sYou could have another capture group to collect the text before our bad string:
^(.*)(number>;crid=1833;check_container=true)$
So now we have two capture groups, which the plugin treats as “$1” and “$2”, and can set the target URL as:
$1
.You could use a negative lookahead (look under “Group Constructs here). I don’t know if this is the best way, but:
^\/((?!wp-admin).)*$
will match:/example.com /example.com/ /example.com/my-page /example.com/my-page?id=1
and fail to match:
/example.com/wp-admin/
This assumes that “wp-admin” is at the beginning of the URLs you want leave un-redirected.- This reply was modified 7 years, 1 month ago by CEMBTW.
Forum: Plugins
In reply to: [Redirection] Weird string causing 404s* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
So
/directory/
will always match your pattern of\/directory\/.*
(remember to escape special characters) and loop.If you want all characters after
/directory/
removed, then you could do something like\/directory\/\S.*
or\/directory\/\S+
. Try it in regex101, and hover over each part to see what they would accomplish.You can also get more information about what is happening during a redirect loop with this tool: https://redirectcheck.com/index.php
Forum: Plugins
In reply to: [Search Meter] Search Results: ZeroI would attempt contact through https://thunderguy.com/semicolon/wordpress/, but the contact form gives a 405 error.
Forum: Plugins
In reply to: [Redirection] Weird string causing 404sIn “[object Object]”, the brackets will have to be escaped as “\[object Object\]”
All the characters in your “number” url should be safe, though.
Use this tool to test various regex matches:
https://regex101.comForum: Plugins
In reply to: [Autoptimize] Some CSS not Being Included After UpdateYes, this is resolved. Thanks for the help!
Forum: Plugins
In reply to: [Autoptimize] Some CSS not Being Included After Update– I didn’t disable everything, but disabling plugins recently changed, or that seemed like likely culprits (W3TC, Plugin Organizer) didn’t seem to fix anything.
– Exclusions resulted in the excluded CSS loading correctly, as expected.
– The problem still existed after reverting to 2.2.2, so I was wrong to associate this with an update.But maybe only somewhat wrong, as I was able to resolve the issue by removing the temporary
add_filter('autoptimize_filter_speedupper', '__return_false');
fix from my functions.php.I though this was a fluke, but I am able to recreate/resolve the issue just by adding/removing that filter, uploading, and refreshing the page.
Any idea why? Does that make any sense?
- This reply was modified 7 years, 2 months ago by CEMBTW.
Forum: Plugins
In reply to: [Autoptimize] Some CSS not Being Included After UpdateI’ve now purged both and verified by checking the cache folders themselves.
Forum: Plugins
In reply to: [Autoptimize] Some CSS not Being Included After UpdateI’ve now turned off caching on that page entirely (and there is no old cached version being served), but I had to remove the
my_ao_noptimize
filter call from my functions.php to get theao_noptimize
querystring to work.Forum: Plugins
In reply to: [Redirection] Sorting redirect by column no longer worksThanks for the fix.
Forum: Plugins
In reply to: [Redirection] Feature: Remove 404 after addingSorry, it seemed like 404 records were being deleted on creation of a redirect on the Redirects page, but I can’t seem to replicate it.
One thing I’m not imagining, though, is that I can no longer sort columns.
Forum: Plugins
In reply to: [Better Image Credits] Images Without Links Still Use AnchorsThen I guess my issue is that I can’t have a different template for when there is no [link].
I ended up putting an
if
inget_single_image_credits()
if ($link == '') { $template = '[source]'; } else { $template = IMAGE_CREDITS_TEMPLATE; }
I’m not sure that
== ''
is the best test to use here, but so far it does what I want.Forum: Plugins
In reply to: [Redirection] Redirection Loop. What is proper regex?Your regex will always find and replace
foo-(.*)
inbar/foo-$1
, because it is there.What you are doing in the htaccess can be also done in the plugin. Try preceding your regex with a “beginning of string” token:
^
, since after the first redirectbar/
will be at the start of the string.[26-06-2017 18:46:30] Revert original image for : C:\inetpub\wwwroot\wordpress/wp-content/uploads/Fruits-of-the-Spirit-Mosaic-Goodness.jpg [26-06-2017 18:46:32] Revert original image for : C:\inetpub\wwwroot\wordpress/wp-content/uploads/Bible-with-Pages-Forming-a-Flaming-Heart.jpg [26-06-2017 18:46:33] Revert original image for : C:\inetpub\wwwroot\wordpress/wp-content/uploads/A-Priest-Burning-Incense-Upon-the-Golden-Altar.jpg
But, again, the log wasn’t even being created (due to the errors in the post above) until I explicitly defined the log path.