Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.