Skip to content

Instantly share code, notes, and snippets.

@rszuban
Created September 18, 2018 07:59
Show Gist options
  • Save rszuban/c7a55ae1072cf222adac137a11f4409a to your computer and use it in GitHub Desktop.
Save rszuban/c7a55ae1072cf222adac137a11f4409a to your computer and use it in GitHub Desktop.
Redirecting requests to Wordpress xmlrpc.php to other URLs via .htaccess file
# 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
# Redirect requests to xmlrpc.php file to Rick Astley - Never Gonna Give You Up video
Redirect 301 /xmlrpc.php https://www.youtube.com/watch?v=dQw4w9WgXcQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment