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 ?
Try this:
RewriteEngine On
RewriteRule ^user/(.*)$ http://domain.com/temp.php [R,L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With