.htaccess - htaccess block users but not bots -


i have wordpress installation in subfolder , used api spa. block users seeing wordpress pages, allow bots crawl them (angularjs app using _escaped_fragment_ serve static content). if user hits /wordpress/ redirect root

what htaccess rules this? (doesn't work):

rewritecond %{request_uri}  ^/wordpress[/]$ rewritecond %{http_user_agent} !=(googlebot|bingbot|baiduspider) [nc] rewriterule ^(.*)$ / [r=301,l]  


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -