Solved

RewriteEngine messes up contents of sub-directory

Posted on 2004-08-12
1
389 Views
Last Modified: 2010-07-27
I have the following in the .htaccess of my /pages/ directory:

          RewriteEngine on
          RewriteBase /pages/
          RewriteRule ^(.*)\.html index.php?id=$1 [NE]

Although it works great, it messes up my .html documents in other directories.
It causes a problem with /pages/subdir/mypage.html

Instead of returning mypage.html, it returns index.php?id=mypage

I *only* want it to affect the /pages/ directory and not any subdirectories.




0
Comment
Question by:hankknight
1 Comment
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 11791647
use also:

RewriteCond %{REQUEST_URI} !.html$
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question