• Hello

    I have installed a link directory in my blog, after a few months I went on and deleted it.

    Now, my blog is:
    https://www.domain.com

    The directory was:
    https://www.domain.com/directory

    The problem is that google has indexed all the directory categories, details pages….etc

    Now I have hundreds of dead pages indexed in google and when I visit one of these pages, it shows the blog main page.

    What do I need to do to redirect “301 Permanent” ANY url under mydomain.com/directory to the main page mydomain.com

    Any help is appreciated.

    Thank You.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter senaia

    (@senaia)

    No one has a general idea on how to do this ?

    RewriteRule ^directory/(.*)$ /$1 [R=301,NC,L]

    .. you would have found the answer on google in seconds if you had looked.

    Thread Starter senaia

    (@senaia)

    Its not working but thanks anyway.

    The following code is working for me. Place it in the .htaccess of the folder you wana redirect, not the .htaccess in root !

    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^(.*)$ https://www.domain.com [R=301,L]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to redirect “301 Permanent” a directory with hundreds of urls !’ is closed to new replies.