The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How Do I export my redirects from Cpanel into a txt file?

Discussion in 'Database Discussions' started by zaletabakman, Jun 15, 2009.

  1. zaletabakman

    zaletabakman Registered

    Joined:
    Jun 15, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi There,

    I have a (hopefully) simple problem but i have no clue how to solve it.

    I have over 100 redirects in Cpanel using subdomains.

    I am moving hosting companies - but how do I get my redirects?

    The only way I can think of is Copy and paste.

    Seems kind of dumb - if anybody can get me started on how to export into a txt file I would appreciate it.

    I have tried google, I have tried the FAQ and couldn't find an answer.

    All help would be appreciated.

    Zale
     
    #1 zaletabakman, Jun 15, 2009
    Last edited by a moderator: Jun 15, 2009
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure I understand you, have you taken a look at the .htaccess file in the public_html directory? If you have setup a redirect to forward one URL to another, that's where they'd be located.
     
  3. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    The redirects should be in a .htaccess file for the folder you configured the sub-directory. In theory you could move that between servers but it's very relative to the path of directories on your new host.
     
  4. zaletabakman

    zaletabakman Registered

    Joined:
    Jun 15, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for answering so quickly.

    I did check out the .htaccess files - but I have over 100 redirects.

    I figured since cpanel displayed them, allowed me to search them, then - they must be stored somewhere. I am certain cpanel doesn't scan the .htaccess files each time.

    They must be in some database somewhere. I looked using phpmyadmin, but couldn't t find anything that made sense to me. (but maybe I didn't know where to look)

    I sort looked around in data files but couldn't find anything.

    Its displayed and searchable, that means it stored.....

    But, I have no idea where cpanel stores its data for retreivale
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Where are you talking about it being displayed? If you mean in the redirects section of your cPanel, those redirects are all stored in the .htaccess file (not files) of your account as explained previously. No where else.

    cPanel does check the .htaccess file each time you open the redirects section of your cPanel. Want to double check? Rename your .htaccess file to .htaccess.BAK then save. Then check the redirects section again.

    Note, by renaming that .htaccess file ALL redirects will break/no longer work.
     
  6. zaletabakman

    zaletabakman Registered

    Joined:
    Jun 15, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    YUCH!!

    I sort of solved the problem,
    I used the rediirects display - set it to 500

    Then used a Screen copy
    Pasted into notepad - format was all messed - but data was there

    then uparrow - delete
    uparrow - delete

    etc etc etc.

    Pain - but it worked and hopefully I didn't delete something important by accident.

    Now I have it in a file - my new hosting company said they have a way of using the file to auto create it. They have something like cpanel called SiteManager

    I don't know if its custom or a packaged product.

    Thanks for everyone's help.
     
  7. mattdmin

    mattdmin Member

    Joined:
    Nov 28, 2008
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Redirects and .htaccess

    If your just moving hosting accounts, you can simply take a copy of that .htaccess file and use it on another machine to copy ALL your redirects.
     
  8. zaletabakman

    zaletabakman Registered

    Joined:
    Jun 15, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Yes - I could.

    But that would mean distributing 100+ files around the system.

    I am incredibly lazy and it would be massively prone to error.

    Also, the redirects are intended as simple ways to let users access content.

    For example - my content are is in Wordpress, I make extensive use of categories to organize things.

    I have one called 77 Guerrilla Job Hunting tips.
    The URL is:
    77 Guerrilla Job Hunting Tips | Zale Tabakman
    but I tell the world to go to
    77 Guerrilla Job Hunting Tips | Zale Tabakman for
    77 Guerrilla Job Hunting Tips | Zale Tabakman

    I also have affiliate programs that I link out to. Why should the poor reader need to see complicated URL's when they can see simple things like:
    Guerrilla Job Search for
    Guerrilla Job Search

    I think its more effective than using TinyUrl or any of its competitors.

    And since they are really redirects - I don't actually need or want the file directories.

    Zale
     
Loading...

Share This Page