I'm running a wiki (http://howdypedia.com/) with the setup on the root of the domain; I know that you're not "supposed" to do this, but here I am. (It's loosely based off the structure of another wiki, and changing it would be a last resort.)
Anyway, things worked fine with this for a while, until recently, I noticed that the robots.txt file for my domain wasn't accessible: It had been the last time I checked, so I have to assume that a software upgrade changed something here. Does anyone know a way I could kludge (through .htaccess, or whatever) robots.txt (and sitemap.txt) into being accessible, without changing the root structure?
robots.txt and sitemap.txt should be accessible anyway. Check you don't have any server trickery that could be causing this.
On 08/04/07, Emufarmers Sangly emufarmers@gmail.com wrote:
I'm running a wiki (http://howdypedia.com/) with the setup on the root of the domain; I know that you're not "supposed" to do this, but here I am. (It's loosely based off the structure of another wiki, and changing it would be a last resort.)
Anyway, things worked fine with this for a while, until recently, I noticed that the robots.txt file for my domain wasn't accessible: It had been the last time I checked, so I have to assume that a software upgrade changed something here. Does anyone know a way I could kludge (through .htaccess, or whatever) robots.txt (and sitemap.txt) into being accessible, without changing the root structure? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 08/04/07, Emufarmers Sangly emufarmers@gmail.com wrote:
Anyway, things worked fine with this for a while, until recently, I noticed that the robots.txt file for my domain wasn't accessible: It had been the last time I checked, so I have to assume that a software upgrade changed something here. Does anyone know a way I could kludge (through .htaccess, or whatever) robots.txt (and sitemap.txt) into being accessible, without changing the root structure?
Your rewrite rule is likely rewriting everything in the root namespace, which is one of the reasons we strongly recommend not filling up your root namespace in this manner. You may or may not be able to get away with some kludges to prevent rewriting cases such as robots.txt.
Rob Church
Here's what I've got right now:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/failed_auth.html$ RewriteRule ^.*$ - [L]
#The Fix http://meta.wikimedia.org/wiki/Using_a_very_short_URL#The_Fix RewriteRule ^[^:]*.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ - [L,NC] RewriteRule ^index.php?title - [L] RewriteRule ^(.*)&(.*)$ $1%26$2 RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]
Options FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]
The strange thing is that other files remain accessible: My favicon and an HTML form I have uploaded can still be reached normally. This seems to be affecting only text files: I created a file called foo.html and could reach it, but foo.txt redirected to Foo.txt.
On 4/8/07, Rob Church robchur@gmail.com wrote:
On 08/04/07, Emufarmers Sangly emufarmers@gmail.com wrote:
Anyway, things worked fine with this for a while, until recently, I
noticed
that the robots.txt file for my domain wasn't accessible: It had been
the
last time I checked, so I have to assume that a software upgrade changed something here. Does anyone know a way I could kludge (through
.htaccess,
or whatever) robots.txt (and sitemap.txt) into being accessible, without changing the root structure?
Your rewrite rule is likely rewriting everything in the root namespace, which is one of the reasons we strongly recommend not filling up your root namespace in this manner. You may or may not be able to get away with some kludges to prevent rewriting cases such as robots.txt.
Rob Church
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Emufarmers Sangly wrote:
#The Fix http://meta.wikimedia.org/wiki/Using_a_very_short_URL#The_Fix RewriteRule ^[^:]*.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ - [L,NC] RewriteRule ^index.php?title - [L] RewriteRule ^(.*)&(.*)$ $1%26$2 RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]
(...)
The strange thing is that other files remain accessible: My favicon and an HTML form I have uploaded can still be reached normally. This seems to be affecting only text files: I created a file called foo.html and could reach it, but foo.txt redirected to Foo.txt.
Maybe on (php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml) you need to add txt ;)
Ah, of course! All those hours of trying to get help on IRC, and it was something so simple...at least I'll know to try the mailing list sooner next time. Thank you very much!
On 4/10/07, Platonides Platonides@gmail.com wrote:
Emufarmers Sangly wrote:
#The Fix http://meta.wikimedia.org/wiki/Using_a_very_short_URL#The_Fix RewriteRule
^[^:]*.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ -
[L,NC] RewriteRule ^index.php?title - [L] RewriteRule ^(.*)&(.*)$ $1%26$2 RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]
(...)
The strange thing is that other files remain accessible: My favicon and
an
HTML form I have uploaded can still be reached normally. This seems to
be
affecting only text files: I created a file called foo.html and could
reach
it, but foo.txt redirected to Foo.txt.
Maybe on (php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml) you need to add txt ;)
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Emufarmers Sangly wrote:
Ah, of course! All those hours of trying to get help on IRC, and it was something so simple...at least I'll know to try the mailing list sooner next time. Thank you very much!
Well, it wasn't obvious until a) you gave the rewriting code which had the extensions b) you told us the "odd behaviour" that .html files worked while .txt not
Your mail had the complete information, and only needed to identify the problem. IRC is line focused. :)
Anyway, the .txt should be added at the meta rewrite :P
mediawiki-l@lists.wikimedia.org