Hell and I hope someone can help. My site is continually getting spammers trying to register (and there is no registration) the same info keeps being used and I am trying to figure a way to stop it and redirect them. This is what they are trying to get to: /profile.php?mode=register Yes I have a forum on my site but it is a subdomain. So this link would not exist on the main site. I have tried to do a 301 redirect in .htaccess but it does not seem to work. I think it is due to the "?" in the link. Anyone have an idea how to redirect these people?
I have this same problem. I keep getting users trying to access /vendershare on my server. I do not have this file. I just set up a 404 redirect to a personalised 404.php page.
Ok, Apache's redirect commands ignore query strings. You'll need to use rewrite commands to get it to work: RewriteEngine On RewriteCond %{REQUEST_URI} ^/profile\.php$ RewriteCond %{QUERY_STRING} ^mode=register$ RewriteRule ^(.*)$ http://mydomain.site/new-page [R=301,L] Code (markup):