Help Please with a redirect 301 with a action in the url

15 replies
  • WEB DESIGN
  • |
[If i have placed this in the wrong place, sorry]

I have been on this for ages and not getting anywhere fast.

My blog is wordpress

Google webmasters are seeing a long list of urls that no longer exist on my site. They have come from a mybb forum i used to have.

I have been trying to redirect 301 in my htaccess file advice from my web host but its not working. They say its bevause i have a action in the url i want to direct but have not giving me a soloution.

this is one of many urls i want to redirect, but whe i do try it something strange happens. When i add this to my htaccess file:

redirect 301 /livthecraft/community/calendar.php?action=addevent&calendar=1&day=2&mont h=4&year=2011/ Best2KeepItSimple.com - Helping Creative Business Owners Succeed

and check it instead of redirecting to http://best2keepitsimple.com it creates this error:

Oops! Google Chrome could not find best2keepitsimple.comcalendar.php

and this is url in the browser: http://best2keepitsimple.comcalendar...th=4&year=2011


I am stumped i dont know what to do and its harming my site in googles eyes for i have like 440+ urls like the above.

i have even tried reinstalling the forum, so the urls work but that does not work either

I have also tried using the wordpress redirection plugin but that does not work either

Any help would be great..

Thanking you in advance
#301 #action #redirect #url
  • {{ DiscussionBoard.errors[8129294].message }}
  • Profile picture of the author prince55l
    Originally Posted by bthankful View Post

    [If i have placed this in the wrong place, sorry]

    I have been on this for ages and not getting anywhere fast.

    My blog is wordpress

    Google webmasters are seeing a long list of urls that no longer exist on my site. They have come from a mybb forum i used to have.

    I have been trying to redirect 301 in my htaccess file advice from my web host but its not working. They say its bevause i have a action in the url i want to direct but have not giving me a soloution.

    this is one of many urls i want to redirect, but whe i do try it something strange happens. When i add this to my htaccess file:

    redirect 301 /livthecraft/community/calendar.php?action=addevent&calendar=1&day=2&mont h=4&year=2011/ Best2KeepItSimple.com - Helping Creative Business Owners Succeed

    and check it instead of redirecting to Best2KeepItSimple.com - Helping Creative Business Owners Succeed it creates this error:

    Oops! Google Chrome could not find best2keepitsimple.comcalendar.php

    and this is url in the browser: http://best2keepitsimple.comcalendar...th=4&year=2011


    I am stumped i dont know what to do and its harming my site in googles eyes for i have like 440+ urls like the above.

    i have even tried reinstalling the forum, so the urls work but that does not work either

    I have also tried using the wordpress redirection plugin but that does not work either

    Any help would be great..

    Thanking you in advance
    You did not post the htaccess code you are using for the redirect, but all the same you can use this tool .Htaccess Redirect Generator or the one given above to generate htaccess redirect.
    On the other way round, if the error are going to one php page like calender.php you can use php to do the redirect.
    but if the error are all coming to your community directory, then create the directory if it is not existing using the redirect tool i gave here, redirect all traffic to that directory to a php page and use that page to decide what you do with the traffic
    {{ DiscussionBoard.errors[8129735].message }}
    • Profile picture of the author bthankful
      Updates

      @Patrick Thanks for that tool which i used, it gave me this:

      # Permanent URL redirect - generated by Online Reference & Tools - RapidTables.com
      Redirect 301 /livthecraft/community/calendar.php?action=addevent&calendar=1&day=2&mont h=4&year=2011 http://best2keepitsimple.com

      which i added to my htaccess file, but it did not work. It redirected me to the same error page i mentioned before.

      @prince55l

      I did your 1st option which was to do a php redirect. so i used the same tool generator and got this:

      <?php
      // PHP permanent URL redirect - generated by Online Reference & Tools - RapidTables.com
      header("HTTP/1.1 301 Moved Permanently");
      header("Location: http://best2keepitsimple.com");
      exit();
      ?>

      Again i placed it in the htaccess file [is this the right place to place a php redirect]. But it produced the same error page as mentioned above.

      referring to your next statment:

      if the error are all coming to your community directory, then create the directory if it is not existing using the redirect tool i gave here, redirect all traffic to that directory to a php page and use that page to decide what you do with the traffic

      How do i go about doin this. I have created the directory community where all the urls are coming from. So i have to create a php file, what do i call it and what do i put in it. Could you explain please
      {{ DiscussionBoard.errors[8130168].message }}
  • Profile picture of the author Patrick
    To redirect a folder, use this...

    RewriteEngine on
    RedirectMatch 301 ^/livthecraft/$ http://best2keepitsimple.com
    {{ DiscussionBoard.errors[8130303].message }}
    • Profile picture of the author bthankful
      @Patrick

      I copied the details and pasted it into my htaccess. However it did not work it still produced an error page:

      Oops! Google Chrome could not find best2keepitsimple.comcalendar.php
      the url for this error is: http://best2keepitsimple.comcalendar...th=4&year=2011
      {{ DiscussionBoard.errors[8130538].message }}
      • Profile picture of the author Patrick
        Originally Posted by bthankful View Post

        @Patrick

        I copied the details and pasted it into my htaccess. However it did not work it still produced an error page:

        Oops! Google Chrome could not find best2keepitsimple.comcalendar.php
        the url for this error is: http://best2keepitsimple.comcalendar...th=4&year=2011
        Hello,

        First of all, you are missing a / at the end of .com

        Secondly, seems like you are trying to redirect a php file..

        So something like this should work...

        Code:
        Redirect 301 /calender.php http://www.best2keepitsimple.com
        If it still didn't work then quote or wrap your htaccess file here in codes.
        {{ DiscussionBoard.errors[8130874].message }}
        • Profile picture of the author bthankful
          Hi Patrick

          I did miss of the / on the details you said for me to use. So i added it and it still produced the error.

          I also tried your other option below

          HTML Code:
          Redirect 301 /calender.php http://www.best2keepitsimple.com
          and again the same error. So here is the details in my htaccess file.

          Code:
          # BEGIN WordPress
          <IfModule mod_rewrite.c>
          RewriteEngine On
          RewriteBase /
          RewriteRule ^index.php$ - [L]
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule . /index.php [L]
          </IfModule>
          
          redirect 301 	/2011/09/let-the-bible-scriptures-help-you-with-your-money-issues/ http://best2keepitsimple.com/2012/08/let-the-bible-scriptures-help-you-with-your-money
          
          -issues/
          redirect 301 	/2011/11/how-do-you-back-up-files-on-your-computer/	http://best2keepitsimple.com/2012/08/how-do-you-back-up-files-on-your-computer/
          redirect 301 	/sti/comments/feed/	http://best2keepitsimple.com/sti/
          redirect 301 	/2011/10/business-card-sizes-oh-how-they-have-changed/	http://best2keepitsimple.com/2012/08/business-card-sizes-oh-how-they-have-changed/
          redirect 301 	/put-your-craft-business-in-the-spotlight/	http://best2keepitsimple.com/feature-handemade-business/
          redirect 301 	/feature-craft-business/	http://best2keepitsimple.com/feature-handemade-business/
          redirect 301 	/livthecraft/comments/feed/	http://best2keepitsimple.com/
          redirect 301 	/2011/04/do-you-show-you%E2%80%99re-appreciation-when-visiting-blogs-that-help/	http://best2keepitsimple.com/2012/08/do-you-show-you%E2%80%99re-
          
          appreciation-when-visiting-blogs-that-help/
          redirect 301 	/2012/06/test-post/	http://best2keepitsimple.com/
          redirect 301 	/2012/06/test1/	http://best2keepitsimple.com/
          redirect 301 	/2012/10/your-marketing-business-card-tips/	http://best2keepitsimple.com/2012/08/your-marketing-business-card-tips/
          
          redirect 301 	/livthecraft/	http://best2keepitsimple.com/
          
          redirect 301 	/test-opt/	http://best2keepitsimple.com/
          redirect 301 	/2010/07/how-to-eliminate-dry-skin-forever/dry-skin/	http://best2keepitsimple.com/2010/07/how-to-eliminate-dry-skin-forever/
          redirect 301 	/2012/page/8/	http://best2keepitsimple.com/
          redirect 301 	/2011/10/business-card-sizes-oh-how-they-have-changed/feed/	http://best2keepitsimple.com/2012/08/business-card-sizes-oh-how-they-have-changed/
          redirect 301 	/2011/04/15/	http://best2keepitsimple.com/
          redirect 301 	/2011/09/let-the-bible-scriptures-help-you-with-your-money-issues/?replytocom=12	http://best2keepitsimple.com/2012/08/let-the-bible-scriptures-
          
          help-you-with-your-money-issues/
          redirect 301 	/2013/05/6-free-business-tools-you-should-be-using/www.google.com/analytics	http://www.google.com/analytics
          redirect 301 	/2013/05/feature-friday-lumie-design/www.facebook.com/LumieDesign	https://www.facebook.com/LumieDesign
          redirect 301 	/2011/04/	http://best2keepitsimple.com/
          redirect 301 	/2013/02/feature-friday-andrea-eserin-jewellery-designs	http://best2keepitsimple.com/2013/05/feature-friday-lumie-design/
          
          Redirect 301 /community/ http://best2keepitsimple.com
          
          redirect 301 /livthecraft/community/	http://best2keepitsimple.com/
          
          
          
          
          
          
          # END WordPress

          I have been working with this url:

          Code:
          http://best2keepitsimple.com/livthecraft/community/calendar.php?action=addevent&calendar=1&day=2&month=4&year=2011
          and this is always the error message i get: Oops! Google Chrome could not find best2keepitsimple.comcalendar.php

          and this error page is this url:
          Code:
          http://best2keepitsimple.comcalendar.php/?action=addevent&calendar=1&day=2&month=4&year=2011
          What i don't get is why it just remove the forward slash after my domain name and thats it.
          {{ DiscussionBoard.errors[8131267].message }}
  • Profile picture of the author Patrick
    First you need to remove all the different types of redirection you are doing related to "livthecraft"...and just use..

    Code:
    RedirectMatch 301 ^/livthecraft/ http://best2keepitsimple.com/
    {{ DiscussionBoard.errors[8131303].message }}
    • Profile picture of the author bthankful
      @Patrick,

      ok remove other lines refering to livthecraft and left just the line you shared above.

      just tested it and the same error happened.
      {{ DiscussionBoard.errors[8131491].message }}
      • Profile picture of the author Patrick
        Originally Posted by bthankful View Post

        @Patrick,

        ok remove other lines refering to livthecraft and left just the line you shared above.

        just tested it and the same error happened.
        The URL was redirecting to the home page, but the query string "?action" and everything else was there that's why you were getting page not found.

        Try this one, this will work...

        Code:
        RewriteRule ^livthecraft/(.*) http://best2keepitsimple.com/? [L,R=301]
        {{ DiscussionBoard.errors[8132293].message }}
        • Profile picture of the author bthankful
          @Patrick

          OMG YOU ARE THE MAN
          - It worked, It worked

          Thank YOU So much

          -------------------------------
          Question can i now delete the livthecraft folder?
          {{ DiscussionBoard.errors[8133667].message }}
          • Profile picture of the author bthankful
            I have found the following error url for another site:

            Code:
            http://www.jwgreetings.co.uk/Greeting-Cards/Friendship/%3C/a%3E%3Cbr%20/%3E.%3C/p%3E%3Cdiv%20class=
            I have tried the normal redirect 301 and it did not work. I also tried to use the code you gacve me that worked on my other site but that did not work either..

            Do you have any ideas ...
            {{ DiscussionBoard.errors[8133741].message }}
            • Profile picture of the author Patrick
              Originally Posted by bthankful View Post

              I have found the following error url for another site:

              Code:
              http://www.jwgreetings.co.uk/Greeting-Cards/Friendship/%3C/a%3E%3Cbr%20/%3E.%3C/p%3E%3Cdiv%20class=
              I have tried the normal redirect 301 and it did not work. I also tried to use the code you gacve me that worked on my other site but that did not work either..

              Do you have any ideas ...

              So all URLs after Greeting-Cards/ should go to home page ?
              {{ DiscussionBoard.errors[8134926].message }}
              • Profile picture of the author bthankful
                @Patrick

                No after Greeting-Cards/ it goes to different pages depending on the menu clicked. However for this link its ok for it to go to the homepage.
                {{ DiscussionBoard.errors[8136607].message }}
  • Profile picture of the author Michael71
    PHP does not belong in .htaccess ...
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[8131773].message }}

Trending Topics