Plugin Contributor
Maya
(@tdgu)
Hi,
This should work fine, the lines might get in conflict with other rewrite code or a server environment block this to run as expected.
Can you manually change the above code to the following:
#RewriteCond %{REQUEST_URI} /panel$
#RewriteRule ^(.*)$ /panel/ [R=301,L]
RewriteRule ^panel(.*) /wp-admin$1 [L,QSA]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^wp-admin(.+) /index.php?wph-throw-404 [L]
Thanks
Thank you for fast reply.
Unfortunately commenting out two first lines changed nothing. Still 404 on /panel. I guess because /panel pointing to /wp-admin and /wp-admin redirects to 404, am I wrong?
Im not using any other plugin, or rewrite rules for that feature.
-
This reply was modified 6 years, 1 month ago by
dersime37.
Plugin Contributor
Maya
(@tdgu)
Hi,
Actually that’s the purpose of this line RewriteCond %{ENV:REDIRECT_STATUS} ^$ it checks for internal redirect before block the default admin.
If you update the lines to the following, does it works for you?
RewriteCond %{REQUEST_URI} /panel$
RewriteRule ^(.*)$ /panel/ [R=301,L]
RewriteRule ^panel(.*) /wp-admin$1 [L,QSA]
#RewriteCond %{ENV:REDIRECT_STATUS} ^$
#RewriteRule ^wp-admin(.+) /index.php?wph-throw-404 [L]
Yes it works, but then old link is accessible, it’s like the “Disable default url” turned off.
Plugin Contributor
Maya
(@tdgu)
It must be caused by the server, for some reason the last 2 rewrite lines are not processed as expected. If you contact us directly I’ll check it further.