Reputation: 1309
i protect my phpmyadmin installation with htaccess. But now i want to rename the url www.myurl.com/phpmyadmin in www.myurl.com/othername and send a 404 response when a user calls /phpmyadmin.
Is it possible to do that with a rewrite condition?
Thank you for helping
Upvotes: 1
Views: 1390
Reputation: 33914
RewriteEngine on
RewriteRule ^phpmyadmin does_not_exist.html # create 404 response
RewriteRule ^othername(/.*)?$ phpmyadmin$1 # rewrite othername to phpmyadmin
You could also send a 410 Gone
response. Replace the first RewriteRule with this:
RewriteRule ^phpmyadmin - [G]
Upvotes: 1