You can try something like the following at the very top of your .htaccess file in the document root (before the WordPress front-controller, ie. before the # BEGIN WordPress block):
RewriteRule ^([\w-]+/)wp-admin /$1 [R,L]
This will redirect /<site>/wp-admin to /<site>/ – where the site name can consist of any of the characters a-z, A-Z, 0-9, _ and -.
http://www.example.com/wp-admin is accessible as normal.
Yes its working, if wordpress is in sub directory its not working.
If the WordPress .htaccess file is in a subdirectory then you will need to modify the directive like so:
RewriteRule ^wp-admin /subdirectory/ [R,L]
However, your setup is still unclear. Do you have multiple .htaccess files for different WordPress installs? A single multi-site .htaccess in a subdirectory and no other .htaccess files?
Related Posts:
- Fix 403 error on WordPress multisite network using subdomains
- How to change home or site url using action hooks or filter?
- WP & Server Speed [Teacher Question]
- Internal Server Errors – Moving working multi-site install to my localhost
- Resource 404 error on multisite subdirectory install
- NGINX rewrite rules for WordPress Subdirectory Multisite to support deep URL
- Running WP Cron on multisite the right way
- How to check if image is already stored in a site’s post database? (network)
- Customize default settings on new sites on multisite
- Sorting list of sites from multisite network using wp_get_sites
- Integrating WordPress to my website, while keeping my own authentication system
- Remove/unset options field from backend Settings->General?
- Multisite get_home_url(); – Getting URL for current site
- How to use wp_insert_user on WordPress Multisite?
- Sort posts from multiple sites by date
- How to run multiple websites from single WordPress setup
- Using PHP in a Stylesheet (possibly a “.htaccess” problem?)
- How to override .htaccess with new rules without ftp or edit it manual
- WordPress-site can be reached on x.x.x.x/index.php – but not directly on the IP without index.php
- Custom php page outside the scope of my theme
- Add htaccess rules with insert_with_markers at beginning of htaccess
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- How to rewrite URL with PHP variables with htaccess to a normal looking URL?
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- 3 blogs same installation, without WP MU
- Two Different Links for Same Product – WooCommerce [closed]
- How to change redirection route to a php page for making it only accessible by logged-in members?
- WordPress returning 404 for multisite pages
- How to call plugin function per site in a multisite?
- WordPress returns “The link you followed has expired” error page whenever I add a new site, add a user etc
- how to combine wordpress htaccess on my root domain + php on subfolder
- custom url rewrite for wordpress
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- Loading index.php contents which located outside blog folder for post single page
- Redirect to another page using contact form 7? [closed]
- Moving code from theme header to functions.php
- Is it best to avoid using $wpdb for security issues?
- Count posts on multisite with blog id
- Troll the hackers by redirecting them
- How do I display offsite database info on my wordpress site?
- Timthumb.php image gallery not working on Multisite WordPress
- Find Site ID From WP_Post
- List all blogs, but exclude the main site
- Seo Friendly Filter URLs
- How to allow download url redirection only if user logged in WordPress site?
- Known Issues in WordPress When Upgrading PHP to ver 7
- WordPress homepage setup not working on first load
- Is it legal to redefine wp_password_change_notification in a mu plugin?
- Why, when moving a WordPress multisite network, have my theme customisations stopped working?
- Is it possible to restrict files from your wordpress uploads (not logged-in users or guest)?
- Simple seo-friendly custom $_GET url rewrite with htaccess
- need help adding a new sidebar to a page that can’t use page-templates -> multisite
- How can I fix this code [duplicate]
- How to sort posts by active category in WordPress?
- wordprees multi-site in user panel add filter
- bp-custom.php is not working on a WordPress multisite environment. how to fix it?
- WordPress Multisite login_redirect to primary blog and specific page based on role
- How to make Subdomain work for product_tag?
- How to serve WordPress folder over subdomain?
- How can I update WordPress plugins or WordPress itself in all server?
- Pages from admin dasboard missing after site migration
- Annoying/confusing WordPress memory limit exhausted
- Create form which redirects to site in network?
- Redirect user role to a specific page on login in a multisite network?
- Changable favicon
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?
- Remove node from multisites?
- WordPress Redirect / Add_Rewrite_Rule – Non Index.php Page
- Add .php to end of all WordPress Pages (multisite)
- How to change query string with pretty URL in WordPress using .htaccess file
- Upload images from one server to an other in wordpress
- List all blogs apart from the current blog and main blog in WordPress Multisite
- Adding users to another blog
- How can I add “.html” to the end of a single URL on a WordPress website?
- redirect 301 with special character like WIX site “#!”
- 301 redirect from webpage to wordpress page in the same root
- Rewrite /keyword1+keyword2.html to search page | .htaccess
- Importing demo data in Multisite
- use system script advertising in wordpress multisite
- WPMU schedule doesn’t execute actions
- Why I can download any file except PHP files from a URL but I can download any from another site?
- WP multisite network plugin fails to see classes loaded with spl autoload
- Host does not allow remote connection, so how do I transfer data to my WordPress site?
- Custom PHP-coding in MU installs
- .htaccess on multisite and roots theme?
- Force string into signup form
- I need a button to appear when not loged in and another when logged in, I need help fixing code PLEASE!
- WPMU – How to echo only one URL
- How to use multiple 404 Error Pages in WordPress
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico
- Internal server error when enabling Multisite in WordPress
- How to create a build for quickly deploying a server with WP?
- Single wordpress multi website down need help factoring what it is
- Enabling pretty permalinks with Docker, Multisite WordPress and Caddy
- Running WP-Cron on Multisite networks the right way?
- How to add query string at the end of sitemap Yoast SEO
- How to Customize the Admin Sidebar Menu in WordPress Multisite Network by changing the backend code of the wp-admin code files?
- Custom theme on multisite has issues with standard loop output
- Set custom post type to load custom block pattern by default