how would one ensure that the "intro" page is visited first before entering a site, even if they've been there before? and how would you go about redirecting a user who hadn't already visited the intro page to the intro page even if they typed in a valid address within your site? is it only possible to do this with javascript?
4/1/2007 8:32:37 PM
Do you hate your users?
4/1/2007 8:34:20 PM
check the referer with php?[Edited on April 1, 2007 at 8:42 PM. Reason : or check form POST variables or etc.]
4/1/2007 8:40:58 PM
^^ no...rather, it's required to avoid legal issues (or so i understand)^ i've only just recently gotten into PHP...i'll see what i can dig up (i wasn't even sure where to start)
4/1/2007 9:14:01 PM
If you had to do it I'd find the equivalent of a application.cfm or global.asp that executes before anything else and tell it that if the user doesn't have a session started display this page. When user visits that page give them a session variable that allows them to view the rest of their site. In cold fusion it's pretty simple. I don't know about asp or php.
4/1/2007 9:40:05 PM
---wack had an internal error sorry bout the double post---[Edited on April 1, 2007 at 9:49 PM. Reason : !]
4/1/2007 9:49:39 PM
you can sort of do it with htaccess and modrewrite, but here's the easiest way (i think)setup a PHP session, when it's started (this will need to be global and across the entire site), send them directly to the intro page. For users who just get to the site, they will see it just like normal. For returning users, they will be redirected. have the session timeout after like 3-4 hours.but really, if there's some legal notice that needs to be seen, do it with some other means, implementing this will piss people off severely and is going to lose your client's a LOT of traffic.
4/2/2007 1:37:27 AM
I can see the need for this with secure document areas where people need to be "forced" to see terms each time for legal reasons. I think Noen's method is the same as mine but I think how we look at it and possible how we would implement it is different. First, in application.cfm (first file executed in a directory and sub directories) it will see if they have an active session. If not, they go to your legal page and by using #cgi.script_name# (cold fusion syntax of a cgi variable) when they click "okay" it will send them to whatever page that were trying to go. It gets more complicated when they bookmark pages that have url specific values. Then you go #cgi.script_name##query_string# (Here's an example of my form for one of my login pages. I do this by telling my application page to see if they have a valid session variable and if they DONT go to my login.cfm. It's the same concept as what you are doing but instead of them having to login, they just need to click okay.
4/2/2007 6:39:30 AM
just make it part of the registration process for the site, and then only allow registered users to access information that requires this legal agreement.
4/3/2007 9:38:34 AM
^ That's ideal but requires a great deal more work than my idea but is probably the smartest way to have a "private" section and a public section.
4/3/2007 11:08:05 AM
True... Unless your website is built with dreamweaver or some other template manager...Then, just as the "logged in" check to the top of the page, with permission set as a default to "granted", changing that variable to "restricted" for the pages you want to keep hidden Could be better in the long run anyhow to spend a little extra time in the beginning to do it the right way.
4/3/2007 12:25:47 PM
cookies?
4/3/2007 1:20:43 PM
since you're already being cruel, make the whole site flash based and import lots of uncompressed image files.
4/3/2007 5:41:43 PM