Cory94bailly Posted March 20, 2009 Share Posted March 20, 2009 Hi, my server is not exactly running apache (it's running lighttp to be exact..) My host (a friend ) does not want to have the server scan every directory for an .htaccess because that would decrease preformance so he is only letting me have one in my main directory (/home/cory/htdocs/) Now the problem is that I have a folder "/home/cory/htdocs/sigs" and I need a .htaccess to work for that folder... <FilesMatch "^.*.png"> SetHandler application/x-httpd-php </FilesMatch> How can I make it so that rule only works for /sigs/? Another question! How can I make it so if the person goes to like /sigs/MyUsername.png, have it get the info from something like 'info.php?name=MyUsername' but keep the file in the browser to stay at /MyUsername.png? Quote Link to comment Share on other sites More sharing options...
corbin Posted March 20, 2009 Share Posted March 20, 2009 You could maybe put a <Directory> statement in the .htaccess file. Not sure if that's possible though. As for the info.php?name=blah..... First off, it's pointless to set the handler if you're going to do that. Secondly, you would do that with mod rewrite. Quote Link to comment Share on other sites More sharing options...
Cory94bailly Posted March 20, 2009 Author Share Posted March 20, 2009 As for the info.php?name=blah..... First off, it's pointless to set the handler if you're going to do that. Secondly, you would do that with mod rewrite. Well I want it so people can put like http://MySite.com/sigs/TheirUsername.png in their signature and have it fetch the info for that username.. The only reason I am using TheirName.png is because most forum boards don't allow .php to link to images. Quote Link to comment Share on other sites More sharing options...
corbin Posted March 20, 2009 Share Posted March 20, 2009 Yeah I know. What I'm saying is, if you don't plan on the internal URL being PNG, you don't need to do a SetHandler. As for the rewrite, it could be something as simple as: RewriteEngine On RewriteRule ^sigs/([a-z0-9_-]+).png$ /sigs/signature.php?user=$1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.