Change Opening page

Discussion in 'PHP' started by rajivv, Mar 19, 2010.

  1. #1
    Hi,

    I have a site adhysteria opening index page on when url is entered which is also homepage
    I want the page /video/index.php to open on default but home to remain as adhysteria index

    Please help. ( want minimum amount of programming)

    Rajiv
     
    rajivv, Mar 19, 2010 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Rajiv - sorry, I didn't quite get what you wanted.

    If a user goes to www.mysite.com you want them to still get the index page

    But in some other instance you want them to get /video/index.php?

    The home page is the default - so what are your rules?
     
    sarahk, Mar 20, 2010 IP
  3. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    site opens adhysteria.com/index.php
    there is anothet page adhysteria.com/video/index.php
    whev a user types adhysteria.con want the video page to
    open.
    when he clicks on home tab he should however still
    go to adhyster.con/index
     
    rajivv, Mar 20, 2010 IP
  4. Latox

    Latox Active Member

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    96
    #4
    Can you please show me the code?
     
    Latox, Mar 20, 2010 IP
  5. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well can you please check adhysteria.com and adhysteria.com/video ( the page i want people to see when they type adhysteria.com)
     
    rajivv, Mar 20, 2010 IP
  6. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Why not in your index.php file in adhysteria.com add the code:

    <?php
    include('./video/index.php');
    ?>
    Code (markup):
     
    Wrighty, Mar 20, 2010 IP
    rajivv likes this.
  7. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thanks will this lead user to that page on openong adhysteria
    com, also whta happens if user clixks home he should go back
    to adhysteriacom

    please advice
     
    rajivv, Mar 20, 2010 IP
  8. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    This will display the /video/index.php at the location of the ./index.php

    That is what you requested.
    Regards.
     
    Wrighty, Mar 20, 2010 IP
  9. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    thanks will try it and get back
     
    rajivv, Mar 20, 2010 IP
  10. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Do i include this anaywhere within file do I need the <?php command i tried got error on opeing page Parse error: syntax error, unexpected '<' in /public_html/index.php on line 33
     
    rajivv, Mar 20, 2010 IP
  11. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    there shouldn't be anything else in your index.php file as you want it to show the /video/index.php file instead.
     
    Wrighty, Mar 20, 2010 IP
  12. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Ok copy that,
    ONe important question home buttons and tabs go to original index file or homepage what to do about that.

    Rajiv
     
    rajivv, Mar 20, 2010 IP
  13. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Change the links ... ?
     
    Wrighty, Mar 20, 2010 IP
  14. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Thanks again
     
    rajivv, Mar 21, 2010 IP
  15. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    How do u +rep , sorry newbie at this
     
    rajivv, Mar 21, 2010 IP
  16. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I think it's the star icon below people's posts .

    :)
     
    Wrighty, Mar 21, 2010 IP
  17. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #17
    FWIW I'd have used .htaccess - if no page requested go to /video otherwise serve up the request page.
     
    sarahk, Mar 21, 2010 IP
  18. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Fatal error: Call to undefined function get_data() in ....video/index.php on line 46
     
    rajivv, Mar 21, 2010 IP