• Resolved marcofama

    (@marcofama)


    hi guys,

    not sure you can help me out but I can’t understand how the Import CSV file should be compiled in order to have it working properly

    I tried the other way around, so I created two redirection using the backend ad exported as CSV.

    For example:

    source,target,regex,type,code,match,hits,title
    “/ita”,”*”,”0″,”url”,”301″,”url”,”0″,””
    “/ita/acsh.html”,”*”,”0″,”url”,”301″,”url”,”0″,””

    although both records have different landings (the first lands to the home page of the new site, the second to a certain path) still the CSV exported has always * in the target column

    Why?

    is there any tutorial to follow?

    thanks a lot
    Marco

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author John Godley

    (@johnny5)

    Can you show the redirects you created?

    Thread Starter marcofama

    (@marcofama)

    Absolutely John and thanks for the quick response

    Here is an example
    https://d.pr/i/T02R6v

    and this is the outcome in the CSV export

    source,target,regex,type,code,match,hits,title
    “/ita”,”*”,”0″,”url”,”301″,”url”,”0″,””
    “/ita/acsh.html”,”*”,”0″,”url”,”301″,”url”,”0″,””
    “/ita/vapsiemens.html”,”*”,”0″,”url”,”301″,”url”,”0″,””
    “/ita/timeh.html”,”*”,”0″,”url”,”301″,”url”,”0″,””

    (last row)

    how can I perform a bulk import? I have a hundred of records which should be a pain to input one at a time ??

    thanks for your help for now!

    Thread Starter marcofama

    (@marcofama)

    I did another test, without including the domain name and it worked well (I can see something in the target column)

    That being said, I created the CSV using Excel but when importing it says 0 records imported as the CSV file format is not valid (check the file format or smth like that, in Italian).

    I exported it using Excel 365 on a Mac, either as CSV UTF8 and CSV but nothing will work :/

    any ideas?

    thanks a lot
    Marco

    Thread Starter marcofama

    (@marcofama)

    FYI, I also tried using a CSV to JSON online converter
    https://www.freeformatter.com/csv-to-json-converter.html

    and the text file, saved as .json, still cannot be imported…

    thanks

    PS: Does this help to debug?
    https://www.dropbox.com/s/fwo9w8rq0jv9zu5/Template%20Import%20di%20Redirection%20-%20Pieno.csv?dl=0

    • This reply was modified 6 years ago by marcofama.
    Plugin Author John Godley

    (@johnny5)

    Ok, you have created a server redirect. That cannot be exported as CSV. I know this is not clear.

    If you created the CSV with Excel and it failed to import then it is likely you did not create a CSV file, but something else. The file needs to be comma-separated, not semi-colon separated or any other separator.

    The Redirection JSON is a structured format and there is nothing a CSV convertor can produce that will work.

    Thread Starter marcofama

    (@marcofama)

    Thanks for the explanation

    it helped me understanding that, although excel calls it “Comma Separated” actually it used the “;” to separate items, ouch!

    I should be ok now. Will let you know if that works in production when I switch the site, hopefully it will still handle requests after a server-wise 301 HTTP > HTTPS redirect too.

    Thanks for now John, really appreciated

    Thread Starter marcofama

    (@marcofama)

    PS: just in case, do you have a guide showing why and what could cause redirect loops / ERR_TOO_MANY_REDIRECTS ?

    Plugin Author John Godley

    (@johnny5)

    I dont have a guide, but a loop is basically when a redirect goes to a target that is redirecting back to the source (directly or indirectly). Typically these are created with greedy regular expressions, but it’s possible to create them with normal redirects.

    For example, you have two redirects that create a loop:

    /source => /target
    /target => /source

    Thread Starter marcofama

    (@marcofama)

    Love it – and now in production all seems to be cool, thanks ??

    PS: can I support and donate for your project plugin and kind support you provide for free (separately from my clients’ site?!) I don’t want the donation to be associated to their site basically…

    Plugin Author John Godley

    (@johnny5)

    Nothing is associated with a particular website, so through the plugin is great.

    Thread Starter marcofama

    (@marcofama)

    Fantastic, thank you!

    just a very dumb one.

    What if I want to create a rule to say for example:

    “Take all the incoming connection to /eng and divert them to / “?

    if I put /eng* it says that it might be a regex but it’s not and I’m not sure how to config that

    can you please help with this little input only?

    Plugin Author John Godley

    (@johnny5)

    You can find more details about regular expressions here: https://redirection.me/support/redirect-regular-expressions/

    /eng* is not a regular expression, it would probably need to be /eng.*

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to import a huge set of link redirections?’ is closed to new replies.