Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 2:48 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
Posted: Mon Jan 30, 2006 3:00 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Jan 02, 2006 12:11 am
Posts: 6
I have a subdirecty in root (same level as Joomla) that contains html and php files that allow users to send emails with attachments.  The files are called with a wrapper in joomla for registered users.  People can skip the login by just linking to the forms directly.  Is there a way to restrict the directory to only work if called from the wrapper?

I tried entering the following in a htaccess file in the subdirectory but it didn't work:

RewriteEngine On

RewriteBase /
  # Blocking direct access
  RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]
  RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ [NC]
  RewriteCond %{REQUEST_URI} ^.*index\\.php$
  RewriteRule .* - [F]


Top
  E-mail  
 
Posted: Wed Feb 01, 2006 1:38 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Aug 17, 2005 11:26 pm
Posts: 869
Try this:

# Blocking direct access
RewriteCond %{HTTP_REFERER} !^http://www.domain/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domain/.*$ [NC]
RewriteCond %{REQUEST_URI} ^.*index\.php$
RewriteRule .* - [F]

Note: index\.php$ not index\\.php$

This needs to be in the .htaccess file in the same directory as the script you are trying to block access to.

_________________
For Mambo assistance: http://forum.mambo-foundation.org
Open Source Research & Best Practice: http://osprojects.info


Top
  E-mail  
 
Posted: Wed Feb 15, 2006 7:50 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Tue Feb 14, 2006 7:40 am
Posts: 4
raymondh wrote:
People can skip the login by just linking to the forms directly.  Is there a way to restrict the directory to only work if called from the wrapper?


Hey, I do have the same problem and the .htaccess doesnt help much... it just block the access to the folder... every kind of access!
Any suggestion?

Tnx


Top
  E-mail  
 
Posted: Fri May 08, 2009 9:29 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed May 06, 2009 3:32 pm
Posts: 3
Can you help me with an example? of
# Blocking direct access
RewriteCond %{HTTP_REFERER} !^http://www.domain/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domain/.*$ [NC]
RewriteCond %{REQUEST_URI} ^.*index\.php$
RewriteRule .* - [F]
?
the wrapper is in this directory http://www.gyn.gr/new/
in the wrapper i call this page http://www.gyn.gr/forum2/forum.asp

so the code must be something like that?

RewriteCond %{HTTP_REFERER} !^http://www.gyn.gr/forum2/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.gyn.gr/new/.*$ [NC]
RewriteCond %{REQUEST_URI} ^.*index\.php$
RewriteRule .* - [F]
?

ok so everyone goes to forum2 his path is redirected to the new/ how will be the wrapper
implemented to this because its a module right? my wrapper shows as a module in this page http://www.gyn.gr/new/index.php?option= ... Itemid=100
so how will i change the abovE code to fit my needs TO REDIRECT ALL the pages of forum2/ inside the wrapper?
Regards Zisopoulos


Top
  E-mail  
 
Posted: Mon May 11, 2009 6:34 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed May 06, 2009 3:32 pm
Posts: 3
Hi again i have restrict the web access to forum2/ directory and now the users have access only via the wrapper the forum. I have one question can search engines red the contnt in the wrapper?
regards Zisopoulos


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group