Need help with a Redirect

Discussion in 'HTML & Website Design' started by ianternet, Jun 25, 2008.

  1. #1
    Ok so I have a page

    myiancome.com which I want to redirect to myiancome.com/start

    I used a 301 redirect for the domain BUT there are actions that happen on myiancome.com

    For example someone signs up via http://www.myiancome.com/index.php?req=newaccount
    when a users completes it sends them to a confirmation page that looks like
    myiancome.com/signupprocesscompletesomethinghere

    with the 301 redirect it till redirect that link because it is not technically pointing to a sub directory.

    so then I tried to redirect on index.php specifically but then since index.php is a php file there are other actions that happen on index.php?req=newacct for example, which will redirect that because of index.php

    what I want is to redirect myiancome.com -> myiancome.com/start , without interrupting any other dynamic or php actions on myiancome

    thanks look for your help
     
    ianternet, Jun 25, 2008 IP
  2. jammy467

    jammy467 Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i think you should be adding a line of code the your .htaccess page. I have to admit I'm not totally up on this but I used .htaccess to redirect from one website to another.

    Try a google search, I found what I was looking for quite easily.

    Tim
     
    jammy467, Jun 25, 2008 IP
  3. q7m

    q7m Well-Known Member

    Messages:
    1,178
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    1
    #3
    Do you want to install the site in a subfolder without affecting the URLs of the pages? If this is what you want please confirm and I'll give you the code for .htaccess.
     
    q7m, Jun 25, 2008 IP
  4. ianternet

    ianternet Well-Known Member

    Messages:
    1,084
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    138
    #4
    yes I do not want to affect myiancome.com urls

    please let me know!
     
    ianternet, Jun 25, 2008 IP
  5. q7m

    q7m Well-Known Member

    Messages:
    1,178
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    1
    #5
    Here's the .htaccess code:
    
    RewriteEngine on
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^(www.)?myiancome.com 
    RewriteRule ^(.*)$ /start/$1 [L]
    
    Code (markup):
     
    q7m, Jun 25, 2008 IP
  6. ianternet

    ianternet Well-Known Member

    Messages:
    1,084
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    138
    #6
    awesome boss - I will give this a try

    thanks!!!
     
    ianternet, Jun 25, 2008 IP
  7. ianternet

    ianternet Well-Known Member

    Messages:
    1,084
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    138
    #7
    ahhh boss - it almost worked.

    http://www.myiancome.com/index.php?req=newaccount

    will redirect to myiancome

    the issue is myiancome should redirect to the blog myiancome.com/start because I do not want them to see myiancome.com the regular sign up and login page, so I did a 301 permanent redirect

    but when someone signup it gets redirected to myiancome.com/?information here, and when that happens it redirect (301) to /start and gives n error because that page does not exist.

    so I want it to keep have myiancome.com go to /start when someone types in myiancome.com but do not want any other aspects of the myaincome to be messed up

    it was my fault - because I didnt think about the affilaite system and the blog all together, I would have the blog then the affiliate system, but I messed up and I have too many affilaites to change the directories now :( trying to find an alternative
     
    ianternet, Jun 25, 2008 IP
  8. q7m

    q7m Well-Known Member

    Messages:
    1,178
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    1
    #8
    So you want only the homepage (http://www.myiancome.com) to be redirested to the blog (/start), not any of the other pages, right?
    Try to add this before the RewriteRule:
    
    RewriteCond %{REQUEST_FILENAME} ^/?$
    
    Code (markup):
     
    q7m, Jun 26, 2008 IP
  9. ianternet

    ianternet Well-Known Member

    Messages:
    1,084
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    138
    #9
    thanks zeegal - sorry it didnt work

    this is what I have in the htaccess

    going to myiancome.com still gets the default layout which I do not want :(

    the htaccess is uploaded didnt do anything

    also if you sign up the main domain gets a wierd confirmation url looks like its via php for example myiancome.com/?datesignupherenamehereusernamehere

    which goes to a different page for confirmation - which I do not want to disturb either - but not sure if that is a page, but it goes to a confirmation page - (did I make sense)? sorry
     
    ianternet, Jun 26, 2008 IP