Viewing 11 replies - 1 through 11 (of 11 total)
  • @hiwebco
    Be more specific. What is your desired redirection scheme? What do you want to redirect from to where?

    From your description it is not clear if you want to redirect those posts from your domain to another or inside your domain?

    Assuming most common scenario, when migrating site to another script or addressing pattern, your domain stays the same. Only post names change. If change is consistent, it is not difficult to do.

    i.e. if you want to redirect

    /old-post-10.html to /new-post-10.html
    /old-post-11.html to /new-post-11.html
    /old-post-11.html to /new-post-12.html
    /old-post-….html to /new-post-….html

    where the only thing changing is post name. You can do this placing this in .htaccess

    RewriteCond %{REQUEST_URI} ^/old-post-.*$
    RewriteRule /old-post-(.*) /new-post$1 [L,R=301,NC]

    This mostly happens when you change your category name i.e from New to Announcements. Then

    RewriteCond %{REQUEST_URI} ^/category/news/.*$
    RewriteRule /category/news/(.*) /category.announcements/$1 [L,R=301,NC]

    does the job.

    Hope it helps. If you need more help, be more specific in description.

    Dear Tom

    The information is really helpful.

    I want to change my Permalink structure from /%category%/%postname%/ to /%post_id%/ due to customized requirement.

    Please tell me, how to use redirect or any other method you suggest. I strongly need this as I do not want to lose anything during this transition.

    Thanks

    Hi sahityah,

    I don’t think it is possible at all when you want to use .htaccess

    Compare two patterns.
    With /%category%/%postname%/ you have links like
    /category-name/first-post-title/
    /category-name/another-post-title/

    /another-category-name/other-post-title/

    With /%post_id%/ you can have
    /2346
    /7610

    /9823

    respectively for the same posts (assuming numbers are posts id’s)

    There is no way to use .htaccess rules and translate name into matching number if you do not have access to database (and you don’t in .htaccess).
    Maybe there is some plugin dealing with this kind of problem?

    Dear,

    Thanks for comments.

    But, I found the plugin (Change Permalink Helper) that did everything I needed.

    Thanks

    Great!

    Thread Starter hiwebco

    (@hiwebco)

    Hi Tom and thanks for ur time

    I am talking about same domain name

    sssddd.com

    I had a news portal (Not WordPress) with 12000 posts

    I installed wordpress to the root of this domain and moved the posts to wordpress

    the old news links were like this:
    sssddd.com/news-100.html

    Unfortunately, if u open any of the old links now, it will take u to the wordpress site with 404 Error

    the Moved posts in wordpress Now have new links /postname/

    I dunno what to do for now so I went and Edited .htaccess and redirected all the old posts /news-1.html –> news-12000.html to /sssddd.com main page

    So I am totally lost and I will loose my SEO, I’ll be more than thankful if u help me out with dis

    OK.. stay calm.. and breath deeply.. ??

    Old news were like sssddd.com/news-100.html

    How about your new-site-news? What are they like?

    Is it any consistent way to translate old-to-new? Describe it in words.

    Thread Starter hiwebco

    (@hiwebco)

    Haha Ok here’es a deep one ufffffffff :P:P

    1- the old links in the old news script were like this sssddd.com/news-10.html

    2- after I moved them and Installed wordpress they are now like this sssddd.com/postname

    due to permalink in wordpress, whereas the old script has no permalink just normal links

    You can still use post-id instead of postname but the biggest question is: are news id’s (i.e. 10 in news-10.html) of old site, the same as post-id’s in new WP site?

    If not, there is no way to fix it ?? unless you have some way to translate old-id to new-id.

    This is the main point to consider when migrating from some-script to WP.

    Thread Starter hiwebco

    (@hiwebco)

    yes this is my problem the Id’s are different

    One last question to try the /%post_id%/ thing

    someone who helped me in migrating the posts has assigned the IDs to be like this: 155000000 so my posts are now looking like this: sssddd.com/15500001
    sssddd.com/15000002

    do u have any clue to how to reset them and make the links calculate normally like:
    sssddd.com/1/
    /2/
    /3/

    without the 150000 he added ?

    Maybe I f I change this and reset it, the old links will then be organized in numbers and all I have is to “play” with the permalink structure

    I have no clue, this is the worst case scenario ??

    Maybe what sahityah used would be of any help for you? He said (in this thread) he used “Change Permalink Helper”. I never used it but.. give it a go..

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘how to redirect huge number of links?’ is closed to new replies.