Black Tiger Posted May 19, 2020 Posted May 19, 2020 (edited) I'm having a policy warning from Google Adsense because a page is violating their policy. The report refers to this page: www.satellitefun.org/forum/index.php?action=login however, that is from my old SMF forum which does not exist anymore since I converted to Invision. So when visiting this page, it's automatically redirected to the same url, but the Invision forum is giving it's "page not found" notice: Errorcode: 1S160/2 I asked adsense for a review and they still say it's violating rules. I do not have -any- adds on error pages. So I don't know what they aer referring to or how to fix this. I have an .htaccess in place which looks like this, can't imagine this is causing it though. <IfModule mod_expires.c> ExpiresActive On # Images ExpiresByType image/jpeg "access plus 1 day" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/webp "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType image/x-icon "access plus 1 year" # Video ExpiresByType video/mp4 "access plus 1 year" ExpiresByType video/mpeg "access plus 1 year" # CSS, JavaScript ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" # Others ExpiresByType application/pdf "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" </IfModule> <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /404error.php [L,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RewriteRule ^forum/index\.php$ /? [L,R=301] </IfModule> Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" I thik I might have added that last RewriteRule ^forum/index\.php$ /? [L,R=301] myself to prevent this happening, not sure, but it doesn't matter if I take it away or leave it like that. So how can I fix it so this url is not found anymore and/or adsense won't complaint about it anymore? Or don't use the forums 404 but the one I have from the hosting? As long as it's a solution. I'm definately -not- looking for a paid mod for solving this. Edited May 19, 2020 by Black Tiger
bfarber Posted May 20, 2020 Posted May 20, 2020 That looks to be a link to a login page - I would recommend just adding an .htaccess rule to redirect that URL to the current login page URL (which is https://www.satellitefun.org/login/). Just google "htaccess redirect URL" and follow one of the billion tutorials out there to set this up.
Black Tiger Posted May 20, 2020 Author Posted May 20, 2020 (f it were that easy I would have done that already but I can't find one that works. So I tried that, but can't find a working one. I thought the one I had should do the trick: RewriteRule ^forum/index\.php$ /? [L,R=301] Also tried to do this on the beginning: Redirect ^forum/index.php?action=login https://www.satellitefun.org/login/ which is also not working. But it's not working, probably it has something to do with the ?action=login.php behind the orignal line, And only the login page needs to be redirected, the other old forum pages need to be redirected correctly.
Black Tiger Posted May 20, 2020 Author Posted May 20, 2020 (edited) I found a way. You can't use url redirects because it needs a query redirect. So that search did not fit. So I started to search for query redirects. Had to search for that too because I'm not native English. RewriteCond %{REQUEST_URI} ^/index\.php$ RewriteCond %{QUERY_STRING} ^action=login$ RewriteRule ^(.*)$ https://www.satellitefun.org/404.shtml? [R=301,L] At first the ?action=login stayed behind it, but after I put the ? at the url, it's fixed. Edited May 20, 2020 by Black Tiger bfarber 1
Black Tiger Posted June 2, 2020 Author Posted June 2, 2020 For references. I redirected this to the current login page, the correct one, which has no ads at all.... still Google is complaining about the no content violation. Very odd.
Recommended Posts