Jump to content

[SOLVED] .htaccess - Catch all requests for a directory


redbrad0

Recommended Posts

I removed a entire directory from my site and need to catch everyone that only goes in that directory and display a message about the pages being moved. I can catch people going to the base directory, but unsure how to make it include all urls inside this directory. Can someone help me with the change on my .htaccess file? Below is the entire htaccess file. I want to catch anyone going to http://www.mydomain.com/manager/somefile.php and send them to http://www.mydomain.com/backoffice/_update.php

 

# Disable PHP "magic quotes"
php_flag magic_quotes_gpc Off

RewriteEngine On
RewriteBase /

# Real files, directories, and links should be served
# directly, so stop the processing here.
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule . - [L]

# DISPLAY THE EVENT
RewriteRule ^e/(.+)/(.+)/?$ event.php?event=$1&%{QUERY_STRING} [L,NC]
RewriteRule ^s/(.+)/(.+)/?$ section.php?section=$1 [L,NC]
RewriteRule ^v/(.+)/(.+)/?$ venue.php?venue=$1 [L,NC]
RewriteRule ^c/(.+)/(.+)/?$ customer.php?customer=$1 [L,NC]
RewriteRule ^dfest/?$ /e/75/dfestfestivaljuly27282007/ [L,NC]
RewriteRule ^manager/?$ /backoffice/_update.php [L,NC]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.