简体   繁体   中英

Rewrite Rule is not working Properly

I have a custom page (test.aleemakhter.com/wp-content/plugins/camophoto/template/login.php). I want to change its URL like this (test.aleemakhter.com/login)

I have done it successfully by this code:

RewriteRule ^login/?$ wp-content/plugins/camophoto/template/login.php [L]

But when i am opening (test.aleemakhter.com/wp-content/plugins/camophoto/template/login.php) URL its not changing into (test.aleemakhter.com/login). Its working fine in one way but not in other way. I think you got my problem.

I have tried this code but its confusing the browser

RewriteRule ^wp-content/plugins/camophoto/template/login.php(.*)$     
http://test.aleemakhter.com/login/$1 [R=301,L]
RewriteRule ^login/?$ wp-content/plugins/camophoto/template/login.php [L]

Plzz help me.

Try using this plugin after you reset your .htaccess file.

  1. Rename wp-login.php: http://wordpress.org/plugins/rename-wp-login/

  2. HC Custom WP-Admin URL: http://wordpress.org/plugins/hc-custom-wp-admin-url/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM