I will ask my question by presenting a situation, hope someone can help me. Totally newbie in HTML and PHP.
main site: www.mainsite.com
concern url to "hide" www.mainsite.com/url.php
I have a forum where there's an exclusive redirect link/board that is visible for certain group of people only.
Question is, how can I redirect the link to www.mainsite.com/url.php, without having to expose the url? So that for that certain group of people to access the url, they need to go thru the forum. And of course, so as not to expose the URL to people outside the circle (doesnt have access to forum)
you can use mod_rewrite to internally rewrite urls (usually) based on matching the patterns of various environment variables (requested urls, query strings, hostnames, etc.) if coded properly the internal rewrite will not expose the rewritten url.
however, you can't really restrict or exclude unwanted visitors by hoping to keep a url secret. the only control you have is providing the response that is appropriate to the visitor-supplied request headers and cookies for the requested url.
how do you identify or recognize that certain group of people?
Since URLs are published on the web as links, you can't keep a URL secret. However, you can control access over what content that URL returns based on what was in the users HTTP request.
You could look at the referrer (which may be missing or spoofed) or you could look at the cookie data that you dropped on their browser on a previous page view (which could be spoofed, unless you take extra steps) or you could ask for a user name and password.