.htaccess - Preventing search engines from indexing Wordpress uploads -


a client has requested files within /uploads directory within wordpress not listed search engines. have tried following within robots.txt

user-agent: * disallow: /wp-admin/ disallow: /wp-includes/ disallow: /wp-content/uploads/ 

and adding following .htaccess , changing browsers user agent googlebot, can still view files

rewritecond %{request_uri} ^/wp-content/uploads rewritecond %{http_user_agent} googlebot rewriterule ^.*$ /404 [l,r=301] 

is there error in of above, or going wrong way?

many in advance.


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -