Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Redirect

  1. #1
    Join Date
    Dec 2009
    Posts
    54
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Question Redirect

    Hi Guys, I'm not sure if this is in the correct forum, but here it goes anyway:

    I have a page with a div (lets call this div = main) which loads every page (www.domain.co.uk/page.html) when you click on the button on the nav bar,

    Is there a way to add a redirect to a custom page for when the full address is entered into the address bar, but stop the redirect if the page loads in 'main'

    Hope i have made that understandable to you all lol

    Thanks

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,313
    Thanks
    28
    Thanked 136 Times in 131 Posts
    Blog Entries
    29

    Default

    I don't quite understand what you want.
    Do you want to not only load 'page.html' in the div when the link for that page is activated in the nav bar but also load 'page.html' in the div when 'www.domain.co.uk/page.html' is entered in the address bar?

  3. #3
    Join Date
    Dec 2009
    Posts
    54
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by molendijk View Post
    Do you want to not only load 'page.html' in the div when the link for that page is activated in the nav bar but also load 'page.html' in the div when 'www.domain.co.uk/page.html' is entered in the address bar?
    That would be great as people could share exactly that page, but if that is not possible then just a redirect to a custom error page will do, but I really like your idea

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,313
    Thanks
    28
    Thanked 136 Times in 131 Posts
    Blog Entries
    29

  5. #5
    Join Date
    Dec 2009
    Posts
    54
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Hi molendijk,

    maybe I am dumb but I cant seem to fathom out where to add the code, it looks like (looking at your source code) that you have made every 'page.html' the same (with the banner/footer.etc) im sure I am missing something but i dont know what, could you help me add this code please?

    Thanks

  6. #6
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,313
    Thanks
    28
    Thanked 136 Times in 131 Posts
    Blog Entries
    29

    Default

    No, you are not dumb. The reason why you only see the source of the main page has to do with the hashchange-technique.
    Just exactly follow the instructions in the example I gave you.

  7. #7
    Join Date
    Dec 2009
    Posts
    54
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    ok, ill give it a good go, will let you know

  8. #8
    Join Date
    Dec 2009
    Posts
    54
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    right, i have done that, it does work in the respect that it displays the index.html (main page with content div) but it displays the landing page within the target div and not the page that is put in the address bar si when i click on button2 in the nav bar, it does not load #page2.html, it only stays on the default page #page1

  9. #9
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,313
    Thanks
    28
    Thanked 136 Times in 131 Posts
    Blog Entries
    29

  10. #10
    Join Date
    Dec 2009
    Posts
    54
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    can I have your email please as i dont want them to be publicly shared as they are test urls?

Similar Threads

  1. redirect
    By game in forum JavaScript
    Replies: 1
    Last Post: 11-16-2012, 05:29 AM
  2. Php redirect
    By keyboard in forum PHP
    Replies: 1
    Last Post: 06-25-2011, 04:05 PM
  3. Redirect or other
    By bluewalrus in forum HTML
    Replies: 4
    Last Post: 03-29-2009, 03:47 PM
  4. Redirect
    By pssparkman in forum HTML
    Replies: 4
    Last Post: 03-03-2008, 11:15 PM
  5. pay an mp3 then redirect
    By hall2003 in forum Other
    Replies: 2
    Last Post: 08-29-2007, 10:15 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •