Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > Apache Help

Apache Help Post any question relating to Apache here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-03-26, 01:19 AM
Junior Member
 
Join Date: Mar 2007
Posts: 2
Leshaun is on a distinguished road
Default Allow A Certain File To Override Htaccess?

Hi all. I'm using Postnuke, and it has an Htaccess in everything but the root folder. If you don't know how Postnuke works, it's a CMS in which people can add modules to the system for more features. I have a module that uses a Flash interface with AMFPHP. Here's the file tree

Code:
Root Folder --> Modules  (htaccess) --> My Mod   --> FlashApp.swf
                                    --> Services --> Remoting.php
Root Folder --> Includes (htaccess) --> ApiFile.php
First Problem: "FlashApp.swf" uses AMFPHP to access the "Remoting.php," but is denied by the htaccess file

Second Problem: Even if that is taken care of, "Remoting.php" needs to access "ApiFile.php"

So yeah, I'm screwed. I don't want to have to mess with the htaccess files used by Postnuke because that would defeat it's efficiency. To make users that may not have the knowledge rewrite an htaccess file is impractical.

I was wondering, could I make an htaccess file to put in the "My Mod" folder that could only allow "FlashApp.swf" and "Remoting.php" to access these folders? If so, could anyone guide me on this?

I've looked at tutorials and it seems as though it may not be possible, but one of the Postnuke guys suggested it to me (with no help on the subject, so it may have just been guess suggestion). If it is impossible, does anyone know a way around in which I wouldn't have to modify the htaccess used by Postnuke?

Thanks in advanced, I know this is long-winded, but I'm desperate here, people.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2007-04-05, 02:12 AM
Senior Member
 
Join Date: Dec 2004
Posts: 199
strasm is an unknown quantity at this point
Default

nothing is impossible. First I believe it is possible to write an allow command for a single file. That should not be a problem.

Keep this in mind. In the case of .htaccess files the child folder inherits from the parent but it can override the parent with anything it says different than the parent. For example if you have public_html/mods/display/ then the public_html/.htaccess would apply to every folder within the directory recursively. if you have public_html/mods/.htaccess that will still have all the rules from the parent folder, but will also be able to add specific rules for everything in the mods folder on down. As a result it makes it easy to make special exceptions to the rules.

Hope this helps
Reply With Quote
  #3 (permalink)  
Old 2007-04-06, 03:05 AM
Junior Member
 
Join Date: Mar 2007
Posts: 2
Leshaun is on a distinguished road
Default

Thanks, man. So, would I use:

Code:
Allow from .mydomain.com/dir/otherdir/filetoaccessphp.swf
If that's the case, I'll try it out. Thanks again.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:01 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.