+ Reply to Thread
Results 1 to 6 of 6

Thread: Help redirecting bad links.

  1. #1
    amvarchitecture is offline x10Hosting Member amvarchitecture is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    16

    Help redirecting bad links.

    The problem with my site, is that I change the name of homepage quite a bit, which means that the link changes. The problem is that people bookmark my site, and then when they want to go back to the website, the page they bookmarked no longer exists, so they get an invalid link. Is there a way to make it so anything typed after the .com will just redirect to my site, which would redirect to my home page?

    Thanks A LOT in advance for any help.

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,267

    Re: Help redirecting bad links.

    In .htaccess in public_html add :


    Code:
    RewriteEngine On
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteRule ^(.*)$ /  [R=301,L]
    This will redirect them to the new homepage and put yoursite.com/ in the address bar.
    You can use /newhomepage.php (or whatever name it has) instead of /

    This assumes you have added somenewhomepage.htm (or whatever) as the index page in .htaccess via

    DirectoryIndex somenewhomepage.htm index.php index.html
    Last edited by descalzo; 11-12-2009 at 09:59 PM.

  3. #3
    amvarchitecture is offline x10Hosting Member amvarchitecture is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    16

    Re: Help redirecting bad links.

    Could you please try to simplify what you said? You lost me. I attached a screenshot of the public HTML folder where all of my website files are.

    Which file do I alter?


  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,267

    Re: Help redirecting bad links.

    Close FileManager
    Bottom of cPanel page find and click on link that says "reset all interface settings"
    Click on FileManager icon
    You should get a File Manager Directory Selection Dialog
    Click on "Show Hidden Files (dotfiles)" checkbox
    --and if you want, the "Skip this question" box too
    Click "Go"
    The FileManager should appear and you should be able to see .htaccess as the first file after your direcories.
    If it is still not there, create it with "New File".

  5. #5
    playminigames is offline x10 Sophmore playminigames is an unknown quantity at this point
    Join Date
    Jul 2009
    Location
    earth
    Posts
    216

    Re: Help redirecting bad links.

    before you go into the file manager you have to allow it to show hidden files, then do what descalzo said. Good luck!

    ha ha descalzo you beat me
    Last edited by playminigames; 11-12-2009 at 10:36 PM.

  6. #6
    balaji2u's Avatar
    balaji2u is offline x10 Lieutenant balaji2u is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Senthamil Nadu,India
    Posts
    410

    Re: Help redirecting bad links.

    If you didnt find show hidden files option,just click index.html and choose edit file then in File Edit window you will see the path of the file at the top left something like
    /home/username/public_html/index.html change it to /home/username/public_html/.htaccess and click OPEN
    now add the code which dezcalzo gave above.
    Good Luck.
    Submit your Site Links Now ! >>> :cool:
    Live Aritlces Free Articles and Links Directory


+ Reply to Thread

Similar Threads

  1. Turn your links into cash - LinkyBank.com
    By linkybank in forum Earning Money
    Replies: 4
    Last Post: 06-26-2009, 10:56 AM
  2. Múltiples links de cuentas de alojamiento / foro
    By Kansy in forum Noticias y Anuncios
    Replies: 4
    Last Post: 03-31-2009, 06:20 PM
  3. Ucash.in - Earn Money from links.
    By fabionj in forum Earning Money
    Replies: 1
    Last Post: 03-30-2008, 06:49 PM
  4. Replies: 0
    Last Post: 03-05-2008, 09:30 PM
  5. Urgent help please!
    By retro-bliss in forum Free Hosting
    Replies: 2
    Last Post: 10-25-2007, 04:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers