Support » Plugin: Redirection » Problem redirecting url with / and without /

  • Hello,

    I don’t know if it is a bug but when I put a 301 redirection like domain.com/news it doesn’t redirect domain.com/news/ (with the “/” at the end)…

    For this case I need to put the both url with and without the “/”… that take me a lot of work.

    I think when it is a modified post it works but with a page it doesn’t work…

    http://wordpress.org/extend/plugins/redirection/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Also when the url ends with .htm redirection doesn’t works…

    “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 .html

    For 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem redirecting url with / and without /’ is closed to new replies.