[Mediawiki-l] rewrite rule for incomplete url like /Namespace:

Sylvain Machefert iubito at gmail.com
Wed Apr 8 21:02:02 UTC 2009


Hello,I have a page with a very long title
mysite.com/Namespace:This_page_title_is_so_long_that_the_email_client_broke_it

In my case, the link became mysite.com/Namespace: and the page title was not
linked
The result of the link is a "bad title" error,
try http://en.wikipedia.org/wiki/Category:   for example

I use htaccess with rewrite rules and I tried, unsuccessfully, to make
visitor falling back on a better page than this "bad title" error.

My rewrite rules look like :
RewriteRule ^/$ /Accueil [R]
RewriteRule ^/?Namespace:$ /Namespace:The_fallback_page [R]

# do the rewrite
RewriteRule ^/?(.*)$ /index.php?title=$1 [L,QSA]

you guess it, I have a problem (else I won't ask you some help ^^) with the
rule
RewriteRule ^/?Namespace:$ /Namespace:The_fallback_page [R]
I tried with %3A instead of :
I tried with [L], [L,QSA]
...
and still the "bad title" error :(

What's wrong with my rewrite rule ?
Thanks in advance for your help!

-- 
Sylvain Machefert

Tous aux Balkans !
http://www.tousauxbalkans.net


More information about the MediaWiki-l mailing list