Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Need a little help with rewrites, if possibble at all |
|
Author |
|
clouseau
Joined: 06 May 2015 Posts: 18 Location: Serbia, Subotica
|
Posted: Thu 01 Dec '16 15:47 Post subject: Need a little help with rewrites, if possibble at all |
|
|
An idea for a WP site is to rewrite access to /wp-login.php with a 404, but if I access it with a /wp-loginabc to rewrite it back to the wp-login.php and give it plain access.
So, hiding /wp-login.php....
RewriteCond %{REQUEST_URI} ^/wp-login.php
RewriteRule ^ - [L,R=404]
RewriteRule "^wp-loginabc.php" "wp-login.php" [L]
The 1st part works. Bu the second on fails with a 404. I can imagine that I'm triggering processing the 1st rule agan with the new rewrite, but how do I avoid this?
It's Apache 2.2 |
|
Back to top |
|
clouseau
Joined: 06 May 2015 Posts: 18 Location: Serbia, Subotica
|
Posted: Tue 06 Dec '16 16:33 Post subject: |
|
|
Anyone? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sat 10 Dec '16 13:06 Post subject: |
|
|
You need to change the order of the rules. First you define that wp-login.php is a 404 and than you try to go to that url. |
|
Back to top |
|
clouseau
Joined: 06 May 2015 Posts: 18 Location: Serbia, Subotica
|
Posted: Sun 11 Dec '16 21:06 Post subject: |
|
|
Thanks for your time.
But, isn't it just what I did? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|