I need to write a rewrite rule so that the url should be point to a directory which is not existing in the application directory. In WordPress all admin process/code in wp-admin, so someone try to login, the url in clients browser will rewrite to http://example.com/wp-admin/*php
. I need to avoid that, I wish the browser should show the directory ec-admin instead of wp-admin. That is http://example.com/ec-admin/*php
This should achieve only by editing htaccess instead of editing entire code.
Here is my .htaccess file
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteRule ^wp-admin/(.*) /ec-admin/$1 [R=301,NC,L]
But now its showing file not found error, is there anyway to fix it?
http://example.com/blog/admin.php?page=orders
tohttp://example.com/admin/admin.php?page=orders