Reputation: 6612
I want to redirect all files (whether it exists or not) in /user directory on my site to a file named temp.php in root directory via .htaccess.
For example, if a user enter user/send.php or user/ or user/send (It may be that not Exists at all), all redirect to temp.php.
How can i do this ?
Upvotes: 6
Views: 3165
Reputation: 49887
Try this:
RewriteEngine On
RewriteRule ^user/(.*)$ http://domain.com/temp.php [R,L]
Upvotes: 8