Same question: Use htaccess to mask folder name
but the answer doesnt work. My .htaccess
file curently look like:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{THE_REQUEST} ^GET /wp-admin/
RewriteRule ^wp-admin/(.*)$ dashboard/$1 [R,L]
RewriteRule ^dashboard(.*)$ wp-admin$1
and I always get:
The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.
dashboard
–wp-admin
it seems like redirecting to each other; I just want to displaying mysite.com/dashboard
but the content must be mysite.com/wp-admin
, I am using wordpress 3.5.1. it is possible, isn’t it? I am not good at all in server stuff; so please help;
Thanks.
I’m not sure why you’re getting the The page isn’t redirecting properly error on your browser, but if the
/dashboard
directory doesn’t physically exist, those requests will get routed through index.php (wordpress). You should try swapping the order of your rules so that the redirects happen before the routing:This way, when you request
http://mysite.com/dashboard
, the 2nd rule will get applied instead of theRewriteRule . /index.php
rule.This might be the reason why your page isn’t redirecting properly:
Try to change your entire
.htaccess
with this directives:If it’s not working, then try to change the comment
#HERE
withRewriteEngine on
.