sroot
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] Plugin Redirection – wildcard expressionStrange, I read that .* matches any character any number of times. Maybe the / is an exception in this plugin.
Anyway, I’d avoid the problem and create a set of redirects, eg:
source:/folder/
target:/source/folder/(.*)/
target:/source:/folder/(.*)/(.*)/
target:/@berchman
try
Source: /slug/(.*)
Target: /newslug/$1
and don’t forget to tick the regex checkbox.For each ‘match’, the regex makes the match available as a variable, $1.
So in the first example
source:/folder/(.*)/(.*)/
target:/newfolder/$1/$2/I had to do a similar thing for my redirects, my notes here
I hope that helps,
SteveForum: Plugins
In reply to: [Redirection] not ALL redirections work?To help us spot the problem for you, can you please share;
1) An example of a source
2) An example of a target that matched
3) An example of a target that didn’t match (and you thought would)
ThanksForum: Plugins
In reply to: [Redirection] Problem redirecting url with / and without /“omain.com/news it doesn’t redirect domain.com/news/”
“Also when the url ends with .htm redirection doesn’t works…”That means your source doesn’t match the requested url. Create a redirection that matches that in addition to the one you have that’s working (or modify your source to a regex that matches both).
EG: Using a regular expression you can only .html posts that by:
Source: /(\d*)/(\d*)/(.*?).html
Target: /$1/$2/$3/
Where the brakets mark out the parts the regular expression applies;
/ = /
(/d*) = any number of digits, when the next character is not a digit it must be
/ = /
..again..
(.*?) = Any number of characters or digits [the .* is any quantity of, ? is any character but won’t match spaces if I remember correctly)
finally ending in .htmlFor me this matches
/2012/11/my-post-title.html and turns it into /2012/11/myposttitle/I made some notes for myself on my blog
Forum: Plugins
In reply to: [Redirection] Cant find the option to select redirect type?On the redirect page, for a redirect you’ve already set up you’ll see:
Green background, a number (like ‘301’), emtpy check box, italic text link with your redirect (or title of your redirect.
Click the redirect link.
The green background opens to a larger box showing you;
title,
source
target
HTTP Code <— it’s a drop down box here, select your redirect typeClick Save button.
I hope that helps