Solved

RewriteEngine messes up contents of sub-directory

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IBM HTTP Server Log rotation 5 159
Htaccess - if subdomain "dev." 2 77
New OSQA server has a ton of fake users 4 62
More Than One Website On Same DMZ Server 3 72
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

786 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