Jump to content

Need .htaccess help..


Cory94bailly

Recommended Posts

Hi, my server is not exactly running apache (it's running lighttp to be exact..)

 

My host (a friend ;D) 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?

Link to comment
https://forums.phpfreaks.com/topic/150258-need-htaccess-help/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/150258-need-htaccess-help/#findComment-789082
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.