1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

htaccess referer

Discussion in 'Apache' started by StevensLabs, Aug 11, 2017.

  1. #1
    I am trying to use the .htaccess to secure my WordPress login. There are plenty of these out there and the most effective includes the addition of the following to htaccess:

    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{HTTP_REFERER} !^http://(.*)?example\.com [NC]
    RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
    RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
    RewriteRule ^(.*)$ – [F]
    Code (markup):
    Here is my setback, i dont want the referrer to be the site, i want it to be my web server/plesk. There is a login link from each subscription that does some redirect magic and logs you in. I was hoping to make my server the referrer but cannot execute it. Any recommendations?
     
    StevensLabs, Aug 11, 2017 IP
  2. rougeceo

    rougeceo Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Does your web server/plesk have a url you could use? Have you tried changing (.*)?example\.com to (.*)?yourpleskdomain\.com? You could also use an ip 123\.456\.789\.323 I believe
     
    rougeceo, Aug 11, 2017 IP
  3. StevensLabs

    StevensLabs Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    I have tried that, also tried https, i simply can't get anything to work. when i click login from plesk the url looks like this,
    https://my.pleskdomain.com:8443/modules/wp-toolkit/index.php/domain/redirect/id/25
    Code (markup):
    then redirects straight to wp-admin so its posting to the login somehow, i should be able to make this the referer somehow.
     
    StevensLabs, Aug 14, 2017 IP