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

Thread: By-pass html conditional re-direct?

  1. #1
    Wannabe Geek ButtermilkJack's Avatar
    Join Date
    Feb 2006
    Location
    Dublin, Ireland
    Posts
    270
    Post Thanks / Like

    Default By-pass html conditional re-direct?

    I have a small html re-direct set-up on the homepage of one of my sites. The redirect catches IE6 uses and sends them to a page where I tell them how bad IE6 is . However, I have a button which lets them go back and browse the site anyway. Needless to say they just end up gping in circles because once they go back to the homepage it sends them back to the IE6 bashing page.

    My question is, what's the easiest way to by-pass the IE6 conditional html if they are coming from the IE6 page?

  2. #2
    respect my AW-THOR-IT-AYY Forbairt's Avatar
    Join Date
    Jun 2007
    Location
    My Office, Dublin
    Posts
    2,424
    Post Thanks / Like

    Default

    Hmmm what language are you using on the server ? ... have a session and set a flag in it ... if the flag exists don't include the ie redirect ... ? else ...

  3. #3
    Wannabe Geek ButtermilkJack's Avatar
    Join Date
    Feb 2006
    Location
    Dublin, Ireland
    Posts
    270
    Post Thanks / Like

    Default

    Cheers Forbairt. I'm using php. My knowledge of php is very basic but I'll have a look at using sessions.

  4. #4
    respect my AW-THOR-IT-AYY Forbairt's Avatar
    Join Date
    Jun 2007
    Location
    My Office, Dublin
    Posts
    2,424
    Post Thanks / Like

    Default

    The basics ...


    Each page you have starts a session (first thing you do in your php)... (if you don't ... php forgets about who the user is even if you start it again in a page or two )

    First time ... session variable isn't set through the [if ie6 statements you've got set up

    Gets redirected to page ... asks do you want to view it anyways ... goes to page and sets session saying yesido=true; add it as a session variable

    Back on your main page .... its refreshed and you check .. is this set ... if it is .. don't print the ie6 statement block ... else print it ...

    simple enough .. will require a bit of fiddling / testing though ...

    just remember ... start the session on each page you've got

  5. #5
    Coder d-tour's Avatar
    Join Date
    Apr 2007
    Location
    Cork
    Posts
    82
    Post Thanks / Like

    Default

    Send them to the redirect page, when they press back have a conditional php statement checking what their referrer page was....

    If it was your ie6page let them in.
    Sessions are a better choice, but only if they allow them.
    Another option is to send use the GET method.

  6. #6
    respect my AW-THOR-IT-AYY Forbairt's Avatar
    Join Date
    Jun 2007
    Location
    My Office, Dublin
    Posts
    2,424
    Post Thanks / Like

    Default

    isn't the session automagically appended to the URL (GET) if they don't allow sessions ?

    Should probably have said ...

    Create a cookie with a 1 year time out (again as dtour has pointed out assuming they allow cookies)

    This way the next time they hit the site after closing the browser they won't be asked do you want to continue.

    BTW excluding IE6 is a bad idea (drawing attention to it) ... given the amount of users that still use it.

  7. #7
    Wannabe Geek ButtermilkJack's Avatar
    Join Date
    Feb 2006
    Location
    Dublin, Ireland
    Posts
    270
    Post Thanks / Like

    Default

    Cheer for the help folks. I'm don't want to exclude IE6. I'm actually working on a workaround for the menu it breaks at the moment so the IE6 page is really a temp measure until I get the fix sorted. So, bearing that in mind I'd rather spend my time trying to fix the css for the menu for IE6 than trying to get the IE6 page working.

    Anyway, I've just removed the redirect and placed the 'Save the developers' javascript in there for the moment . Probably not the best idea as it's a client site and not my own but I'll remove it once I get the fix done.

    Thanks again!

  8. #8
    Coder d-tour's Avatar
    Join Date
    Apr 2007
    Location
    Cork
    Posts
    82
    Post Thanks / Like

    Default

    Much better solution, what the CSS issue?
    Much better to have a seperate css file for IE6 users.

  9. #9
    Wannabe Geek ButtermilkJack's Avatar
    Join Date
    Feb 2006
    Location
    Dublin, Ireland
    Posts
    270
    Post Thanks / Like

    Default

    It actually turned out to be quite simple enough to fix the css. It was to do with a drop-down menu and IE6 stretching the li elements out to the full width of the div, whereas Gecko browsers treated width: auto as the width of the a tag inside the li.

    Schoolboy error

  10. #10
    Coder d-tour's Avatar
    Join Date
    Apr 2007
    Location
    Cork
    Posts
    82
    Post Thanks / Like

    Default

    Keep sending them to the redirect and tell them how bad your css is

Page 1 of 2 12 LastLast

Similar Threads

  1. HTML - Useful Links
    By blacknight in forum HTML Basics
    Replies: 5
    Last Post: 12-11-2011, 02:22 AM
  2. Email marketing compared to direct marketing.
    By JCB in forum Email Marketing
    Replies: 30
    Last Post: 15-01-2009, 03:43 PM
  3. Direct Admin & MySQL databases...
    By Zascar in forum Webmaster Discussion
    Replies: 3
    Last Post: 14-08-2007, 12:29 PM
  4. Signatures no longer direct links?
    By dude in forum Forum Feedback, Development and Competitions
    Replies: 4
    Last Post: 04-04-2007, 05:17 PM
  5. Converting HTML to RSS?
    By blacknight in forum Coding Help
    Replies: 3
    Last Post: 05-02-2006, 06:06 PM

Visitors found this page by searching for:

html conditional direct

conditional html session variables

conditional html bookmarks

conditional HTML domain

bypass html redirection

bypass html password

re-direkt html

conditional html password

Tags for this Thread

Posting Permissions

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