Jump to content

htaccess problems


HaLo2FrEeEk

Recommended Posts

Is there a way to make an htaccess file only work for the directory it's present in?  I have one that rewrites some dynamic links to static looking ones, and it messed up some stuff further up the folder heirarchy, though I don't knoe exactly how?  I renamed the htaccess file to .test so it wouldn't affect anything, but I would like to have it, so is there any way I can make it only work in the current folder?  Thanks!

Link to comment
https://forums.phpfreaks.com/topic/106155-htaccess-problems/
Share on other sites

I guess I'm greedy, lol, that might have done it.

 

RewriteEngine on
RewriteRule d_(.*)$ index.php?file=$1
RewriteRule (.*)_(.*)_(.*)_(.*).html$ index.php?page=$1&rpp=$2&so=$3&admin=$4
RewriteRule (.*)_(.*)_(.*).html$ index.php?page=$1&rpp=$2&so=$3
RewriteRule (.*).html$ index.php?page=$1

 

I didn't think it would mess anything up, but it's the naming I'm doing that was messing with it.  It was only 5 files that were being affected, out of 35.

 

How would I go about putting conditions in there?  Basically I want this to only work for the folder which it is physically located in, and no deeper.

Link to comment
https://forums.phpfreaks.com/topic/106155-htaccess-problems/#findComment-544170
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.