redbrad0 Posted January 20, 2008 Share Posted January 20, 2008 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 https://forums.phpfreaks.com/topic/86859-solved-htaccess-catch-all-requests-for-a-directory/ Share on other sites More sharing options...
Fyorl Posted January 20, 2008 Share Posted January 20, 2008 RewriteRule ^manager/somefile.php$ /backoffice/_update.php [QSA,L] Link to comment https://forums.phpfreaks.com/topic/86859-solved-htaccess-catch-all-requests-for-a-directory/#findComment-443978 Share on other sites More sharing options...
redbrad0 Posted January 20, 2008 Author Share Posted January 20, 2008 well i dont want to have to list all files in the manager directory. isnt there something to catch all files just in this one directory? Link to comment https://forums.phpfreaks.com/topic/86859-solved-htaccess-catch-all-requests-for-a-directory/#findComment-443984 Share on other sites More sharing options...
Fyorl Posted January 20, 2008 Share Posted January 20, 2008 Yes RewriteRule ^manager/(.*)$ /backoffice/_update.php [QSA,L] Link to comment https://forums.phpfreaks.com/topic/86859-solved-htaccess-catch-all-requests-for-a-directory/#findComment-443989 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.