?
Solved

Rewrite directory to 404/index.htm

Posted on 2008-10-22
1
Medium Priority
?
238 Views
Last Modified: 2010-03-04
Hello,

I want to redirect all requests from applicationDir/ to 404/index.htm

I only have access to mod_rewrite through a .htaccess file.

All these should be rewritten:
         applicationDir
         applicationDir/
         applicationDir/page.html
         applicationDir/sub/dir/page.html

0
Comment
Question by:hankknight
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 27

Accepted Solution

by:
caterham_www earned 2000 total points
ID: 22781941
In a /.htaccess:
RewriteEngine on
RewriteRule ^applicationDir /404/index.htm [L]
 
 
^ = start of string, followed by the string applicationDir and maching anything following right to applicationDir. If applicationDirFoo should not be matched, the RegEx needs some modification:
 
RewriteRule ^applicationDir($|/) /404/index.htm [L]

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month8 days, 21 hours left to enroll

765 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