![]() |
![]() |
#1 |
"/X\(‘-‘)/X\"
Jan 2013
3·977 Posts |
![]()
I notice that the forum is available at http://ftp.mersenneforum.org and that Google indexes that. It might be an idea to disable the forum from being accessible on ftp.mersenneforum.org or to set a canonical URL to point to the www version so Google returns results only on www.
|
![]() |
![]() |
![]() |
#2 |
Feb 2012
34×5 Posts |
![]()
Add the following to the Apache host configuration (somewhere within VirtualHost tag, for example):
Code:
RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.mersenneforum\.org$ [NC] RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$ RewriteRule ^(.*)$ http%2://www.mersenneforum.org%{REQUEST_URI} [R=301,L] |
![]() |
![]() |
![]() |
#3 | |
"Mike"
Aug 2002
3×2,689 Posts |
![]() Quote:
(Also, what does it do?) ![]() |
|
![]() |
![]() |
![]() |
#4 |
Feb 2012
40510 Posts |
![]()
If the AllowOverride FileInfo configuration option is set, then this should work from .htaccess file.
Apache mod_rewrite module is required (usually it is on). What does this do? It permanently redirects everything that does not look like www.mersenneforum.org to www.mersenneforum.org, and keeps the correct protocol (http/https) and correct request string after the domain name. For example, when somebody or a robot goes to Code:
http://ftp.mersenneforum.org/showthread.php?p=401885#post401885 Code:
http://www.mersenneforum.org/showthread.php?p=401885#post401885 |
![]() |
![]() |
![]() |
#5 |
"Mike"
Aug 2002
11111100000112 Posts |
![]()
We applied your change and it looks like it worked. Thanks!
![]() |
![]() |
![]() |
![]() |
#6 |
Feb 2012
34·5 Posts |
![]()
You are welcome.
As Google spider re-visits the offending pages it will make a note of the correct destinations and the search index should get updated accordingly. This usually takes a while… |
![]() |
![]() |
![]() |
#7 |
"Mike"
Aug 2002
806710 Posts |
![]()
Somehow the new rewrite rules are not working for links like this:
http://mersenneforum.org/gimps/mprime276-linux64.tar.gz Instead it shows the "banned" message. ![]() Code:
ErrorDocument 403 "Your IP address has been banned. If you think this is a mistake, please email xyzzyATmersenneforumDOTorg for assistance." Options -Indexes <ifModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf AddOutputFilterByType DEFLATE font/truetype font/opentype </ifModule> <ifModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 5 seconds" ExpiresByType image/x-icon "access plus 604800 seconds" ExpiresByType image/jpeg "access plus 604800 seconds" ExpiresByType image/png "access plus 604800 seconds" ExpiresByType image/gif "access plus 604800 seconds" ExpiresByType text/css "access plus 604800 seconds" ExpiresByType text/javascript "access plus 604800 seconds" ExpiresByType application/javascript "access plus 604800 seconds" ExpiresByType application/x-javascript "access plus 604800 seconds" </ifModule> RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.mersenneforum\.org$ [NC] RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$ RewriteRule ^(.*)$ http%2://www.mersenneforum.org%{REQUEST_URI} [R=301,L] order allow,deny Lots of IP addresses! allow from all |
![]() |
![]() |
![]() |
#8 |
"/X\(‘-‘)/X\"
Jan 2013
3×977 Posts |
![]()
Try changing
RewriteCond %{HTTP_HOST} !^www\.mersenneforum\.org$ [NC] to RewriteCond %{HTTP_HOST} ^ftp\.mersenneforum\.org$ [NC] that will only rewrite links to ftp.mersenneforum.org, not anything that isn't www.mersenneforum.org. |
![]() |
![]() |
![]() |
#9 |
Feb 2012
34×5 Posts |
![]()
Not sure what is going on here... Check a couple of things, please:
* The /gimps folder does not have an .htaccess file of its own, right? * Is there any evidence in the web server log files (errors are often in a separate log file), maybe file locations looking wrong or folders missing in the file paths? |
![]() |
![]() |
![]() |
#10 | |
"Mike"
Aug 2002
3·2,689 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#11 | ||
"Mike"
Aug 2002
3·2,689 Posts |
![]() Quote:
Code:
Options Indexes IndexIgnore HEADER.html IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* SuppressHTMLPreamble SuppressDescription HeaderName HEADER.html Quote:
|
||
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mersenneforum Art Gallery | Orgasmic Troll | Lounge | 4 | 2020-12-01 08:33 |
The mersenneforum First 300 | ewmayer | Lounge | 15 | 2012-08-27 18:35 |
HELP!! Can't Log In to mersenneforum | Unregistered | Information & Answers | 8 | 2010-09-06 18:24 |
p95v2511.zip from mersenneforum.org | Unregistered | Information & Answers | 2 | 2010-03-31 15:43 |
archives of mersenneforum.org? | masser | Forum Feedback | 2 | 2007-12-27 15:34 |