Redirecting problem in Cpanel

Discussion in 'WordPress' started by RightMan, Dec 13, 2008.

  1. #1
    I am getting following error when I try to redirect from home to a subfolder...
    Can anybody suggest what needs to be corrected?

    I had added the following in htaccess as advised by wordpress after I changed permalinks to custom---/%postname%/
    Regards,

    RightMan
     
    RightMan, Dec 13, 2008 IP
  2. cormac

    cormac Peon

    Messages:
    3,662
    Likes Received:
    222
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I hate mod_rewrite on WP.

    Your best bet would be to make htaccess writeable and let WP auto update the htaccess file.

    Wish I had a better answer for you. :(
     
    cormac, Dec 14, 2008 IP
  3. Fracisc

    Fracisc Well-Known Member

    Messages:
    3,670
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    195
    #3
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]

    Delete the red part.
     
    Fracisc, Dec 15, 2008 IP
  4. caj

    caj Active Member

    Messages:
    748
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    75
    #4
    Same problem I was facing. The problem solved using the following solution. Simple html redirect. I save the code below as index.html and upload it to my root folder as I want to redirect the root to another sub-domain. Likewise you can redirect from sub-domain to root.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>Your Page Title</title>
    <meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>
    <BODY>
    Optional page text here.
    </BODY>
    </HTML>

    Another thing I found out was that you can used the redirect in cpanel to a folder. It must be a subdomain I was told by my host.

    for example you can't redirect - www.yourdomain.com - subfolder www.yourdomain.com/whatever-folder-name. It must be for example www.yourdomain.com redirect to http://subdomain.yourdomain.com!
     
    caj, Dec 15, 2008 IP