Solved

RewriteEngine messes up contents of sub-directory

Posted on 2004-08-12
1
383 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

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 …
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now