Solved

Rewrite directory to 404/index.htm

Posted on 2008-10-22
1
236 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 500 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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
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…

734 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