1
thygar
How to Stop Direct Linking to Specific Modules?
  • 2007/1/23 15:47

  • thygar

  • Just popping in

  • Posts: 9

  • Since: 2005/3/8 1


Hello,

I am trying to figure out if it is possible to stop users from bypassing the entire site and only going to one specific module, for instance the CBB forums. Currently we have users that bypass the everything and simply put in the url http://www.sitename.com/modules/cbb and thereby forgoing everything else.

Can this be done, so that users have no choice but to go to the front page first and then click on the menu to go to the forums?

We currently have the autologin feature enabled so that users are not prompted for logins all the time, I know if we turn this off it would fix it, but I would rather not have to resort to that if possible.

Thanks in advance.

2
zyspec
Re: How to Stop Direct Linking to Specific Modules?
  • 2007/1/23 17:35

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Although I haven't tried this specifically - I think if you add the following to an .htaccess file in the /cbb directory this would work:
RewriteEngine on
RewriteCond 
%{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?sitename.com/.*$ [NC]
RewriteRule .(php)$ http://www.sitename.com/index.php [R,L]


This will replace any requests for php pages in the /cbb diretory that don't originate with your site to be served the ./index.php file

Others may have better ideas but I think I'd start with something like this....

Hope it helps.

Login

Who's Online

349 user(s) are online (221 user(s) are browsing Support Forums)


Members: 0


Guests: 349


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits