Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Posts
    63
    Plugin Contributions
    0

    Default Need help redirecting old htm pages (.htaccess)

    Hey guys,

    I need to correctly redirect my old .htm pages to my new equivalent .php pages. My knowledge of Apache, .htaccess & mod_rewrite is VERY limited, so I really could use some help w/ this. I've spent countless hours searching SEO forums & reading various tutorials, but I can't seem to find a "simple" fix. I just don't have the time to learn a new coding language, and I don't want my ranking to plummet...

    Example:

    http://mydomain.com/new_cd.htm --TO--
    http://mydomain/index.php?main_page=products_new

    http://mydomain.com/dvd.htm --TO--
    http://mydomain.com/index.php?main_page=index&cPath=66

    http://mydomain.com/main_cd_s.htm --TO--
    http://mydomain.com/index.php?main_p...ex&cPath=65_91

    http://mydomain.com/main_cd_t.htm --TO--
    http://mydomain.com/index.php?main_p...ex&cPath=65_92

    etc, etc...

    I know that there are friendlier ways to write 'page=index&cPath=65', but it's beyond me; not sure about the query strings or the inclusion of www. either...

    If someone could properly translate the above example, that would be great! My scrambled brain is currently incapable of processing detailed instructions - I just need a quick-fix-cheat-sheet!

    I'm sure this will benefit others, as well.

    My sincerest thanks to anyone who can help me w/ this!!!

  2. #2
    Join Date
    Sep 2005
    Posts
    28
    Plugin Contributions
    0

    Default Re: Need help redirecting old htm pages (.htaccess)

    I have a very simple .htaccess file in my root directory for redirects

    It goes like this

    Options +Includes
    XBitHack on
    redirect 301 /Experiential.html http://www.wilderdom.com/experiential
    redirect 301 /games/gamesspecific.html http://www.wilderdom.com/games
    etc.

    (those aren't meant to be active urls, its just meant to be text, but i can't seem to edit out the [url] tags)
    Last edited by wilderdom; 18 Jun 2006 at 05:21 AM. Reason: note

  3. #3
    Join Date
    Sep 2005
    Posts
    63
    Plugin Contributions
    0

    Default Re: Need help redirecting old htm pages (.htaccess)

    Quote Originally Posted by wilderdom
    I have a very simple .htaccess file in my root directory for redirects

    It goes like this

    Options +Includes
    XBitHack on
    redirect 301 /Experiential.html http://www.wilderdom.com/experiential
    redirect 301 /games/gamesspecific.html http://www.wilderdom.com/games
    etc.

    (those aren't meant to be active urls, its just meant to be text, but i can't seem to edit out the [url] tags)

    Thanks, wilderdom. What I really need is a redirect for my pages + query strings (as listed in my initial post). I know there are a number of ways to do this, but I'm looking for the best & easiest way. In the interim, prissy little googlebot steps further & further away.... What a p.i.t.a.....

  4. #4
    Join Date
    Oct 2005
    Posts
    211
    Plugin Contributions
    0

    Default Re: Need help redirecting old htm pages (.htaccess)

    1.27d

    I am in simalar situation, with little success with forum search.

    I went to Cpanel and I had success redireting my /index.htm to /index.php file.

    But if I try to redirect something like "www.mywebsite/products.htm" over to- "www.mywebsite/catalog/index.php?main_page=product_info&cPath=1&products_id=1"

    then I get a 404 Not Found error when tested.

    Also the Cpanel redirect for last example shows (product_info&cPath) instead of (pemanent).

    Any feedback much appreciated.
    Last edited by Justwade; 30 Jun 2006 at 08:15 AM.

  5. #5
    Join Date
    Oct 2005
    Posts
    211
    Plugin Contributions
    0

    Default Re: Need help redirecting old htm pages (.htaccess)

    1.27d
    No SEO contrib
    or SEFU or
    whatever url tweeks

    Well I learn by expermenting and when I don't find any easy answers. I hope I am doing this right.

    I figured out that Cpanel redirects don't work to good with ? and the like.

    So I tried a few anyway in Cpanel and then looked at the .htaccess file to see what it did. First time I have even looked at the file.

    And from a post tip on my host site, I learned to change all the "RedirectMatch ..." lines at the bottom.

    I should say that you want to just remove em if you made any in your expermenting.

    First, I put a folder nearby and put the original .htaccess file in it, (just in case)

    Then with a copy put near the bottom;

    Redirect permanent /your_old_file_name.htm http://www.your_website.com/catalog/your_new_page......... (whatever new url)

    and just repeat this down a list with the old file name followed with one space the new url that you just copy a choice from your site. The above example was one line with one space after .htm. I tested now and then to see what happens and it worked when I did it exactly right, (with cut and pasting file names you can still make mistackes).

    Oh and becareful you don't go back to your cpanel redirect and mess it up, did that but worked on copy on PC and had back up. Start with NO redirects in Cpanel. I suppose I will throw away my copy in the folder on server.... well maybe tomorrow, when I see if I made a security hole or something.

    Appears to work ok,

    Now, for my own paronoid satisfaction, how hard is it for someone to just come in and hyjack a site ths way?
    Last edited by Justwade; 30 Jun 2006 at 10:34 AM.

  6. #6
    Join Date
    Oct 2005
    Posts
    211
    Plugin Contributions
    0

    Default Re: Need help redirecting old htm pages (.htaccess)

    Say oldschoolrocker,

    Using your examiples I assume that you would change in the .htaccess file the following additions.

    Redirect permanent /new_cd.htm
    http://mydomain/index.php?main_page=products_new

    Redirect permanent /dvd.htm
    http://mydomain.com/index.php?main_page=index&cPath=66

    Redirect permanent /main_cd_s.htm
    http://mydomain.com/index.php?main_p...ex&cPath=65_91

    Redirect permanent /main_cd_t.htm
    http://mydomain.com/index.php?main_p...ex&cPath=65_92

    But its late, I am tired and I now see wilderdom answered it another way that should work.

 

 

Similar Threads

  1. v151 Redirecting from old store to /shop/
    By RFree190 in forum General Questions
    Replies: 2
    Last Post: 20 Mar 2013, 10:08 PM
  2. Redirecting Contact Us form in .htaccess
    By Convergence in forum General Questions
    Replies: 12
    Last Post: 5 Mar 2011, 07:26 PM
  3. Replies: 3
    Last Post: 11 Apr 2010, 07:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg