Sorry to bug everyone again... I want to use mod rewrite to convert ugly url's (index.php?title=Main_Page) to nicer ones (index.php/ Main_page). The ugly URL is enabled in my LocalSettings.php.
I've created this .htaccess file:
RewriteRule ^index.php?title=(.*)$ index.php/$1 [L]
And put it in my root directory. But it seems to have no effect (the provider says rewriting is enabled).
Does anyone see what I'm doing wrong?
Thanks, Michelle
Moin,
On Sunday 23 April 2006 18:40, Michelle wrote:
Sorry to bug everyone again... I want to use mod rewrite to convert ugly url's (index.php?title=Main_Page) to nicer ones (index.php/ Main_page). The ugly URL is enabled in my LocalSettings.php.
I've created this .htaccess file:
RewriteRule ^index.php?title=(.*)$ index.php/$1 [L]
And put it in my root directory. But it seems to have no effect (the provider says rewriting is enabled).
Does anyone see what I'm doing wrong?
I had the same problem, and after digging around that worked:
RewriteEngine on php_flag register_globals 0 # /wiki/Foo => /wiki/index.php?title=Foo RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^wiki/(.+)$ /wiki/index.php?title=$1 [L,QSA]
The RewriteEngine on needs to be there, and the rewriting is better than the rule you have (which did not work on my server, either).
HTH,
Tels
On 4/23/06, Michelle michelle.sg1@gmail.com wrote:
Sorry to bug everyone again... I want to use mod rewrite to convert ugly url's (index.php?title=Main_Page) to nicer ones (index.php/ Main_page). The ugly URL is enabled in my LocalSettings.php.
I've created this .htaccess file:
RewriteRule ^index.php?title=(.*)$ index.php/$1 [L]
And put it in my root directory. But it seems to have no effect (the provider says rewriting is enabled).
Does anyone see what I'm doing wrong?
Thanks, Michelle
I think the problem is that you are going the wrong way, you want to convert the pretty urls that the user sees INTO the ugly ones so that they can be processed.
http://meta.wikimedia.org/wiki/Rewrite_Rules#Using_a_rewrite_rule_in_a_.htac...
As I understand it $wgArticlePath affects what mediawiki puts out as links, not whether or not pretty urls are handled correctly, that's in the domain of apache and php. So to put it another way, you use the rewrite rules to convert pretty url's into "ugly" ones internally for processing (unseen by the user), and you use $wgArticlePath to make the urls in <a> tags and the like, generated by mediawiki be in pretty format, since the user WILL see these.
-- Rick DeNatale
Visit the Project Mercury Wiki Site http://www.mercuryspacecraft.com/
Thanks very much, Rick and Tels for clearing up my basic confusion on the rewriting. I tried Tels' rules while changing the LocalSettings back to pretty url's and got a server 500 error. I'll keep plugging away though. Thanks again,
Michelle
Out of curiosity, can anyone explain why this is so difficult in the first place? Why can't it just be set to do this 'out of the box'? I assume there's a good reason for it.
I remember trying to sort it out once myself but gave up.
Christiaan
On 23 Apr 2006, at 6:50 PM, Michelle wrote:
Thanks very much, Rick and Tels for clearing up my basic confusion on the rewriting. I tried Tels' rules while changing the LocalSettings back to pretty url's and got a server 500 error. I'll keep plugging away though. Thanks again,
Christiaan Briggs wrote:
Out of curiosity, can anyone explain why this is so difficult in the first place? Why can't it just be set to do this 'out of the box'? I assume there's a good reason for it.
Because every web server has a different way of doing it and it requires that *you* change *your* web server's configuration files.
-- brion vibber (brion @ pobox.com)
On 25 Apr 2006, at 2:44 AM, Brion Vibber wrote:
Christiaan Briggs wrote:
Out of curiosity, can anyone explain why this is so difficult in the first place? Why can't it just be set to do this 'out of the box'? I assume there's a good reason for it.
Because every web server has a different way of doing it and it requires that *you* change *your* web server's configuration files.
-- brion vibber (brion @ pobox.com)
Okay, so putting it another way, could a similar system to that used in Wordpress ever be implemented, or is MediaWiki designed in such a way that it will always require configuration of the web server in this regard?
Christiaan
Christiaan Briggs wrote:
Okay, so putting it another way, could a similar system to that used in Wordpress ever be implemented, or is MediaWiki designed in such a way that it will always require configuration of the web server in this regard?
IIRC WordPress has an option to print out some sample Apache configuration lines, which you still have to manually install/activate, and won't work on any other web server software, or on Apache if you don't have the appropriate permissions enabled by your system administrator (since this is not available by default). Is this what you're referring to?
-- brion vibber (brion @ pobox.com)
No, actually - I do know what he's referring to, and now that I think about it, it's confusing me exactly HOW they DO do it. In the wordpress control panel, you can type in a certain re-write path, and it... just works. That is weird, never really thought about it before. I don't have a running wordpress install right now, or I'd go fiddle with it ^^/
On Apr 25, 2006, at 8:36 AM, Brion Vibber wrote:
Christiaan Briggs wrote:
Okay, so putting it another way, could a similar system to that used in Wordpress ever be implemented, or is MediaWiki designed in such a way that it will always require configuration of the web server in this regard?
IIRC WordPress has an option to print out some sample Apache configuration lines, which you still have to manually install/activate, and won't work on any other web server software, or on Apache if you don't have the appropriate permissions enabled by your system administrator (since this is not available by default). Is this what you're referring to?
Elliott F. Cable wrote:
No, actually - I do know what he's referring to, and now that I think about it, it's confusing me exactly HOW they DO do it. In the wordpress control panel, you can type in a certain re-write path, and it... just works. That is weird, never really thought about it before. I don't have a running wordpress install right now, or I'd go fiddle with it ^^/
Like this... :)
<p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Make_a_Directory_Writable">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p>
-- brion vibber (brion @ pobox.com)
I feel stupid - never had it mess up before LOL (-:
On Apr 25, 2006, at 1:26 PM, Brion Vibber wrote:
Elliott F. Cable wrote:
No, actually - I do know what he's referring to, and now that I think about it, it's confusing me exactly HOW they DO do it. In the wordpress control panel, you can type in a certain re-write path, and it... just works. That is weird, never really thought about it before. I don't have a running wordpress install right now, or I'd go fiddle with it ^^/
Like this... :)
<p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/ Make_a_Directory_Writable">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p>
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
hi I'v recently been getting hit with, I presume, spambots. Usernames are created - usually 10digits or so.
I've just added the following line to my local settings to try and stop it - all entries start with =<div style="display:none">
$wgSpamRegex=<div style="display:none">
Can anyone verify whether they think this will work or not?
Thanks
John ----- Original Message ----- From: "Brion Vibber" brion@pobox.com To: "MediaWiki announcements and site admin list" mediawiki-l@Wikimedia.org Sent: Tuesday, April 25, 2006 10:26 PM Subject: Re: [Mediawiki-l] converting ugly url to pretty with rewrite
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Moin,
On Sunday 30 April 2006 11:01, John Bidder (Home Office) wrote:
hi I'v recently been getting hit with, I presume, spambots. Usernames are created - usually 10digits or so.
I've just added the following line to my local settings to try and stop it - all entries start with =<div style="display:none">
$wgSpamRegex=<div style="display:none">
Can anyone verify whether they think this will work or not?
We should add a FAQ entry if there isn' already one (no I didnt check :)
make that:
$wgSpamRegex='/display\s*:\s*none/i';
best wishes,
tels
Hi,
Back again with this one,
After putting the suggested code in my localsettings.php, literally the following day I got hit again.
Here is a URL to an example history page http://www.wikiville.org.uk/index.php?title=Hold_your_horses%21%21%21&ac... =history
Spam entries start with <div style="display:none">
My local settings looks like this:
/** Text matching this regular expression will be recognised as spam * See http://en.wikipedia.org/wiki/Regular_expression */ $wgSpamRegex='/display\s*:\s*none/i'; $wgSpamRegex="/overflow:auto/"; $wgSpamRegex="/overflow: auto/"; $wgSpamRegex="/overflow\s*:\s*auto/";
Any suggestions in simplest terms appreciated.
Many Thanks
John
On 30/4/06 11:12, "Tels" nospam-abuse@bloodgate.com wrote:
Moin, On Sunday 30 April 2006 11:01, John Bidder (Home Office) wrote:
hi I'v recently been getting hit with, I presume, spambots. ............ it - all entries start with =<div style="display:none" $wgSpamRegex=<div style="display:none">
We should add a FAQ entry if there isn' already one (no I didnt check :) make that:
$wgSpamRegex='/display\s*:\s*none/i';
best wishes, tels
On 02/05/06, John Bidder john@highlanddrive.wanadoo.co.uk wrote:
My local settings looks like this:
/** Text matching this regular expression will be recognised as spam
$wgSpamRegex='/display\s*:\s*none/i'; $wgSpamRegex="/overflow:auto/"; $wgSpamRegex="/overflow: auto/"; $wgSpamRegex="/overflow\s*:\s*auto/";
You're overwriting the value of the variable each time, so the last is the only one which takes effect. Try something like
$wgSpamRegex = '/(display\s*:\s*none|overflow\s*:\s*auto)/';
Rob Church
Moin,
On Tuesday 02 May 2006 22:26, Rob Church wrote:
On 02/05/06, John Bidder john@highlanddrive.wanadoo.co.uk wrote:
My local settings looks like this:
/** Text matching this regular expression will be recognised as spam
$wgSpamRegex='/display\s*:\s*none/i'; $wgSpamRegex="/overflow:auto/"; $wgSpamRegex="/overflow: auto/"; $wgSpamRegex="/overflow\s*:\s*auto/";
You're overwriting the value of the variable each time, so the last is the only one which takes effect. Try something like
$wgSpamRegex = '/(display\s*:\s*none|overflow\s*:\s*auto)/';
We need a FAQ entry for that one _fast_.
best wishes,
tels
On Wed, May 03, 2006 at 12:13:54AM +0200, Tels wrote:
You're overwriting the value of the variable each time, so the last is the only one which takes effect. Try something like $wgSpamRegex = '/(display\s*:\s*none|overflow\s*:\s*auto)/';
We need a FAQ entry for that one _fast_.
What about allowing this to be an array? For many people this will be easier than writing a complicated regex that combines all the patterns they want to match.
Tony
On 03/05/06, Tony Bowden wikimedia@tmtm.com wrote:
On Wed, May 03, 2006 at 12:13:54AM +0200, Tels wrote:
You're overwriting the value of the variable each time, so the last is the only one which takes effect. Try something like $wgSpamRegex = '/(display\s*:\s*none|overflow\s*:\s*auto)/';
We need a FAQ entry for that one _fast_.
What about allowing this to be an array? For many people this will be easier than writing a complicated regex that combines all the patterns they want to match.
Could do. See also http://www.mediawiki.org/wiki/Help:FAQ#How_do_I_use_.24wgSpamRegex_to_block_... where I wrote up an example of using arrays to make the whole thing easier to handle.
Rob Church
Hi
I've seen a number of Wiki's where <rss> </rss> enables the url pointing directly to an rss feed to display in a main article. There's been no javascript going on, no apparent extras in the code at all.
Some Wiki versions have been more recent and some older than mine. When I attempt this with my Wiki (v1.5.6) the url renders literally as the URL - ie. <rss>webaddress</rss> .
Any suggestions in simplest terms appreciated,
Thanks
John
It's an extension, installed in the /extensions/ directory. I don't know the exact link, but there is an article about that particular extension somewhere on meta.
On May 7, 2006, at 2:52 PM, John Bidder wrote:
Hi
I've seen a number of Wiki's where <rss> </rss> enables the url pointing directly to an rss feed to display in a main article. There's been no javascript going on, no apparent extras in the code at all.
Some Wiki versions have been more recent and some older than mine. When I attempt this with my Wiki (v1.5.6) the url renders literally as the URL - ie. <rss>webaddress</rss> .
Any suggestions in simplest terms appreciated,
Thanks
John
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Hello,
It's an extension that you can find at http://meta.wikimedia.org/wiki/GISWiki/RSS copy it as rss.php in extensions directory
You should also get magpierss that you will get at http://magpierss.sourceforge.net/
You copy everything in extensions directory
Then you should add "require_once('magpierss/rss_fetch.inc');" in rss.php
The last thing is to edit LocalSettings.php with something like: require_once("extensions/rss.php");
And then you should be able to use <rss>
Christophe
Elliott F. Cable a écrit :
It's an extension, installed in the /extensions/ directory. I don't know the exact link, but there is an article about that particular extension somewhere on meta.
On May 7, 2006, at 2:52 PM, John Bidder wrote:
Hi
I've seen a number of Wiki's where <rss> </rss> enables the url pointing directly to an rss feed to display in a main article. There's been no javascript going on, no apparent extras in the code at all.
Some Wiki versions have been more recent and some older than mine. When I attempt this with my Wiki (v1.5.6) the url renders literally as the URL - ie. <rss>webaddress</rss> .
Any suggestions in simplest terms appreciated,
Thanks
John
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Fantastic, thanks Christophe, I've been trying to get some simple instructions to do this too.
Christiaan
On 8 May 2006, at 8:09 AM, Christophe de Livois wrote:
Hello,
It's an extension that you can find at http://meta.wikimedia.org/wiki/GISWiki/RSS copy it as rss.php in extensions directory
You should also get magpierss that you will get at http://magpierss.sourceforge.net/
You copy everything in extensions directory
Then you should add "require_once('magpierss/rss_fetch.inc');" in rss.php
The last thing is to edit LocalSettings.php with something like: require_once("extensions/rss.php");
And then you should be able to use <rss>
Christophe
Elliott F. Cable a écrit :
It's an extension, installed in the /extensions/ directory. I don't know the exact link, but there is an article about that particular extension somewhere on meta.
On May 7, 2006, at 2:52 PM, John Bidder wrote:
Hi
I've seen a number of Wiki's where <rss> </rss> enables the url pointing directly to an rss feed to display in a main article. There's been no javascript going on, no apparent extras in the code at all.
Some Wiki versions have been more recent and some older than mine. When I attempt this with my Wiki (v1.5.6) the url renders literally as the URL - ie. <rss>webaddress</rss> .
Any suggestions in simplest terms appreciated,
Thanks
John
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org