wordpress - Change .htaccess to forbid spam links -


my site got hacked , bunch of links in spammer-created /up sub-directory getting lot of hits.

i have cleared out mess (a .htaccess rewrite , wp-stat.php file, , ignore/forbid requests /up directory.

currently have simple wordpress created .htaccess, can't find way of trapping requests /up before rewrite rules take on , give 404 page wordpress theme.

<ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> 

you can replace current code one

<ifmodule mod_rewrite.c> rewriteengine on rewritebase /  rewritecond %{request_uri} ^/up(/.*|$) [nc] rewriterule ^ - [f]  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^ index.php [l] </ifmodule> 

this forbid /up urls


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -