logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



Need a little help with rewrites, if possibble at all

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
clouseau



Joined: 06 May 2015
Posts: 18
Location: Serbia, Subotica

PostPosted: Thu 01 Dec '16 15:47    Post subject: Need a little help with rewrites, if possibble at all Reply with quote

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

PostPosted: Tue 06 Dec '16 16:33    Post subject: Reply with quote

Anyone?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6604
Location: Germany, Next to Hamburg

PostPosted: Sat 10 Dec '16 13:06    Post subject: Reply with quote

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

PostPosted: Sun 11 Dec '16 21:06    Post subject: Reply with quote

Thanks for your time.
But, isn't it just what I did?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6604
Location: Germany, Next to Hamburg

PostPosted: Thu 22 Dec '16 21:40    Post subject: Reply with quote

If you can't manage ut with rewrite rules you can use this plugin to get it working

http://wordpress.org/extend/plugins/better-wp-security/

if thre is still a question please ask again
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1