Thread Starter
Matrix
(@matric)
Could someone help me, please?
Matteo
First:
The first form is more accurate. The backslash before the dot let’s the dot be interpreted as a simple dot. Without the backslash the dot is a placeholder for any character at that position.
The $ at the end restricts redirects to links which have nothing appended (no ?param1=xyz or #section3 will be allowed).
Second:
Enable checkbox ‘Regex’
Source URL: /comment-subscriptions\?srp=(\d+)
Target URL: /?p=$1
I assume that the last phrase '&sra=s' does not change and always follows after 'srp=...'.
See post Unable to export CSV on how to use it in an import CSV file.
I need to redirect wso pages to pages on a wordpress site..would I be able to use the redirection plugin to do this?
Thanks!
steve
Thread Starter
Matrix
(@matric)
@jochent
Hi, thanks you very much for the rule… :-)…
I have another question for you…
Now in Google Webmaster tool I have 6 thousand errors like this:
2012/06/padfone-arrivera-a-luglio-il-nuovo-smartphone-tablet-di-asus/1345626330000/1347309190000
or this:
2012/06/padfone-arrivera-a-luglio-il-nuovo-smartphone-tablet-di-asus/1345626330000/
the correct link are only this: 2012/06/padfone-arrivera-a-luglio-il-nuovo-smartphone-tablet-di-asus/
How could I fix the errors with redirection?
Thanks you very much…
Matteo
PS Where I can find a guide how to learn the rules to use redirection? Thanks for all… π
PPS I try to use this rule:
source: /(\d*)/(\d*)/(.*)/(\d*)/(\d*)
target: /$1/$2/$3
Regex checked
is it correct?
You have set all expressions to optional (you have added a star instead of a plus). May be this is the cause of the problem. Try
source: ^(/\d+/\d+/.+?/)[\d/]+
target: $1
This means if a sequence consisting only of digits or slashes follows immediately after the slash behind the article slug the link will be redirected.
This redirection works only for articles. The first slash at the end of the text after the first two numbers (/2012/06/…text…/) is used for the identification. An adress like /2012/06/category/padfone-arrivera-a/1345626330000/1347309190000 will not work with this expression. You may have to experiment with this a bit.
For a source of a more simple explanation of regular expressions use Google search.
A detailed documentation can be found with the Perl programming language documentation or a short explanation at http://de3.php.net/manual/en/pcre.pattern.php
Thread Starter
Matrix
(@matric)
@jochent
Hi,
Thank you very much for the support and for the link… I hope I could learn the syntax… :-)…
Have a good day…
Matteo
Thread Starter
Matrix
(@matric)
@jochent
Hi, I have another question for you…
The rule that you write before is ok and run correctly… but I have a problem with this link:
/2012/04/page/14/ because, with the rule, it become /2012/04/page/ and it make a 404 error…
I try this rule:
/(.*)/page/(.*)
Do nothing
Regular Expression check
Could you check if the rule that i writed is ok or could be better?
Thank a lot
Matteo
Use
source: ^(/\d+/\d+/.+?/)[\d/]{9,}
target: $1
This requires that at least 9 digits and/or slashes hanging at the end.