Htaccess Question

mav3n

lvl 9000 IQ
Joined
May 22, 2011
Messages
4,077
Reaction score
702
FP$
330
Alright, this is what I am trying to do here.

I have, in another directory, a folder that contains another part of WebFerno that I only want members to see. What I have is a link in the navigation bar to such folder that when clicked on, leads to another page that is reserved for just members. However, I don't want the public to type in www.weferno.com/**** and get to that page, only members that click on the link when their signed in.

TL😀R - I have a page that I want only accessible to members that click on the link on WebFerno and not allow the public with the link to get to it.

What rewrite mod would I use for this?
 
Htaccess is not the right technology to use I don't think. If you want to check whether someone is logged in, Apache (the web server) has no concept of whether someone is logged in. You need to write a dynamic web page which performs this check (using PHP or a similar technology). How exactly you do this depends on what software you use to manage logins to your website (MyBB for instance).

You will need to contact the support for the software provider or check their documentation to figure out how to build such a web page (unless someone here already knows how to do it). If you do not know how to do this yourself you may need someone else to do it for you. The general steps which this dynamic web page would have to do are:

1. Read the session cookie from the user's browser (such as PHPSESSID, although it varies by software)
2. Connect to a database to verify that the user is actually logged in.
3. Display the web page.

Some software products make this really easy. It just depends on what you're using. 🙂
 
Back
Top Bottom