When I click on the link to http://intranetsite.com:12843/wiki/Project_Meeting_of_02/22/06
I get the dreaded HTTP 404 Error
Using Windows2003,IIS and ISAPI Rewrite physical location is c:\wiki\MediaWiki\MediaWiki-1.6.3
LocalSettings.php statements: - - - - - - $wgScriptPath = ""; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; ## For more information on customizing the URLs please see: ## http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url ## If using PHP as a CGI module, the ?title= style usually must be used. $wgArticlePath = "/wiki/$1"; # $wgArticlePath = "$wgScript?title=$1"; - - - - - - - - - httpd.ini content is:
# Translate beautified links of wiki RewriteRule /wiki/([^/?.]+)(?:?(.+))? /index.php?title=$1?2&$2: [I,L] RewriteRule /wiki/(?=Special)([\w:]+)/([\w:]+) /index.php?title=$1&target=$2 [I,L]
What the %?*$/1# is goingin on?
Appreciatively again, Brian
New information: It appears that my Mediawiki crafts article links containing characters like ()- with their escapecode equivilent. So a pretty link to an article named "Brion(our hero)" appears /wiki/Brian%28our_hero%29 which makes a match to the rewriterule and gets rewritten/translated back to the ugly format successfully.
But my MW doesn't replace characters .(period) or /(foreslash) in article links. So the pretty link to an article like "Rob Church helps of 02/2006" appears "/wiki/Rob_Church_helps_of_02/2006" which doesn't make a match to my rewriterule, and therefore doesn't get rewritten back to the ugly format.
I haven't tested all special characters to see which ones work or not...
facts update: ISAPI_Rewrite created a new httpd.parse.error, but of 0 KB. ISAPI_Rewrite.dll isapi filter is loaded in iis IIS logfile entry is
2006-05-04 12:33:12 GET /wiki/Project_Meeting_of_02/22/06 - 172.18.96.118Mozilla/4.0(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET +CLR+1.1.4322) http://intranetsite.com:12843/wiki/Main_Page 404 0 3 This also happens for pages with a period like: http://intranetsite.com:12843/wiki/version3.0_Guide but rewrite works for the following pages: /wiki/Snapshot_File_(version_2) /wiki/Integration_-_Industry_News
thanks, Brian
---------- Forwarded message ---------- From: Brian Carpenter hopespoppa@gmail.com Date: May 3, 2006 10:37 AM Subject: Translate/Rewrite beautified pretty ugly URLs-works except for special characters in article titles To: MediaWiki announcements and site admin list mediawiki-l@wikimedia.org
When I click on the link to http://intranetsite.com:12843/wiki/Project_Meeting_of_02/22/06
I get the dreaded HTTP 404 Error
Using Windows2003,IIS and ISAPI Rewrite physical location is c:\wiki\MediaWiki\MediaWiki-1.6.3
LocalSettings.php statements: - - - - - - $wgScriptPath = ""; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; ## For more information on customizing the URLs please see: ## http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url ## If using PHP as a CGI module, the ?title= style usually must be used. $wgArticlePath = "/wiki/$1"; # $wgArticlePath = "$wgScript?title=$1"; - - - - - - - - - httpd.ini content is:
# Translate beautified links of wiki RewriteRule /wiki/([^/?.]+)(?:?(.+))? /index.php?title=$1?2&$2: [I,L] RewriteRule /wiki/(?=Special)([\w:]+)/([\w:]+) /index.php?title=$1&target=$2 [I,L]
What the %?*$/1# is goingin on?
Appreciatively again, Brian
Sorry, I think you're pretty much on your own; we don't really have Windows 2003 on hand to test with. If you're having problems with IIS you can't resolve, try Apache.
-- brion vibber (brion @ pobox.com)
If there were only a way to use apache... I would. But the only server I have admin access to runs Windows Sharepoint Services, which relies on IIS. I'm new to webservers in general so everything has been a learning curve. Early on in the my MediaWiki Journey I got the feeling that apache would be a lot simpler. There is definitely more help from others with apache, but I do appreciate all the assistance obtained from the MW developers and the MW community. bc
On 5/4/06, Brion Vibber brion@pobox.com wrote:
Sorry, I think you're pretty much on your own; we don't really have Windows 2003 on hand to test with. If you're having problems with IIS you can't resolve, try Apache.
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Not to beat a dead horse... But is this an IIS problem as MediaWiki is not crafting all the URLs as 'pretty'?
On 5/4/06, Brion Vibber brion@pobox.com wrote:
Sorry, I think you're pretty much on your own; we don't really have Windows 2003 on hand to test with. If you're having problems with IIS you can't resolve, try Apache.
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Brian Carpenter wrote:
Not to beat a dead horse... But is this an IIS problem as MediaWiki is not crafting all the URLs as 'pretty'?
Sure it does. If your web server is broken and not interpreting those URLs correctly, that's the fault of the web server configuration.
Perhaps you think pretty URLs are something different from what we think they are, so let me be clear.
Here's a sample of an ugly URL:
/some_path?title=My_cool_page_title
Here's a sample of a pretty URL:
/some_path/My_cool_path_title
The difference is that pretty URLs pass the page title in the URL's path component, while ugly URLs pass the title as a query string parameter. Other than that there is no inherent difference in appearance or encoding.
By default MediaWiki will create pretty URLs for straight article views if it detects that your PHP configuration is capable of supporting this, using the default path through the script name (eg /index.php/My_cool_page_title).
By default MediaWiki will create ugly URLs for other actions, though simple cases can also be set to produce pretty URLs by setting up $wgActionPaths.
Any use of pretty URLs requires that your web server be configured appropriately to pass that title data on to MediaWiki in some way. In a typical Apache+mod_php configuration, additional path components after the script name are passed to the script as $_SERVER['PATH_INFO']. In other configurations it may or may not be so passed. Rewriting incoming URLs to query string parameters is also possible, but requires that you be careful of encoding issues to ensure that all characters are handled correctly (Apache gets it wrong by default).
-- brion vibber (brion @ pobox.com)
Good Afternoon Wiki Fans:
Is there some way of viewing a page such that the various edits to it are annotated in a manner where the writer of the particular content can be identified. This is something we often want to know when we are looking at a page and want to track down the source of the information we are reading.
Thanks for your assistance,
--Hiram
Good Afternoon Wiki Fans:
Is is possible to configure the MediaWiki system to only allow additions to Discussion/Talk pages and prohibit editing other's additions to these pages ? I'd like to be able to capture a discussion during the development of an idea and thereby record its history without users being able to go back and edit previous inputs.
Thanks for your assistance,
--Hiram
On 5/4/06, Hiram Clawson hiram@soe.ucsc.edu wrote:
Good Afternoon Wiki Fans:
Is is possible to configure the MediaWiki system to only allow additions to Discussion/Talk pages and prohibit editing other's additions to these pages ? I'd like to be able to capture a discussion during the development of an idea and thereby record its history without users being able to go back and edit previous inputs.
Hmmm.... Well, if the LiquidThreads/discussion overhaul that is being propossed for Google Summer of Code goes through...
One way I see to do this is to only allow the "section=new" editing of discussion pages but not allow the raw editing of discussion pages.
Look at EditPage.php. $this->section is assigned on line 409 in version 1.6.5. You will probably want to insert some logic after this line to manually set $this->section to 'new' when you are editing a discussion page. I am not sure what side-effects this will have, however. In addition, you will still see 'edit' links next to section titles on discussion pages but this hack will force their clicking to result in the "section=new" behavior while editing.
The only other way I see to do what you want is to write an 'ArticleSave' hook. The hook will return true if old content is not destroyed and false if it is. However, you will still have issues with the edit box displaying other's content. You might be able to write a hook for the edit page that removes other's content from the text box. I've never tried this and don't know if it is even possible.
Good point, I guess I have been mixing two separate issues: I'll continue to
investigate IIS, ISAPI_Rewrite rules and translation of pretty URL's elsewhere.
So what would cause my instance of MW to generate article links differently for some special characters? In my case, MW crafts the link to an article containing a ( in the title with %28 to replace the "(". But MW doesn't replace "." with "%2E" or replace "/"s with ""%2F" when creating links.
My instance created both links below:
Example1 ( MW doesn't encode "/"s when creating the link) Article title "Meeting of 02/22/06" http://mysite.com/wiki/index.php?title=Meeting_of_02/22/06
Example2 (MW encodes "(" and ")" to %28 and %29) Article title "Integration Assistant (IA)" http://mysite.com/wiki/index.php?title=Integration_Assistant%28IA%29
Thanks again for your patience, Brian
On 5/4/06, Brion Vibber brion@pobox.com wrote:
Brian Carpenter wrote:
Not to beat a dead horse... But is this an IIS problem as MediaWiki is not crafting all the URLs as 'pretty'?
Sure it does. If your web server is broken and not interpreting those URLs correctly, that's the fault of the web server configuration.
Perhaps you think pretty URLs are something different from what we think they are, so let me be clear.
Here's a sample of an ugly URL:
/some_path?title=My_cool_page_title
Here's a sample of a pretty URL:
/some_path/My_cool_path_title
The difference is that pretty URLs pass the page title in the URL's path component, while ugly URLs pass the title as a query string parameter. Other than that there is no inherent difference in appearance or encoding.
By default MediaWiki will create pretty URLs for straight article views if it detects that your PHP configuration is capable of supporting this, using the default path through the script name (eg /index.php/My_cool_page_title).
By default MediaWiki will create ugly URLs for other actions, though simple cases can also be set to produce pretty URLs by setting up $wgActionPaths.
Any use of pretty URLs requires that your web server be configured appropriately to pass that title data on to MediaWiki in some way. In a typical Apache+mod_php configuration, additional path components after the script name are passed to the script as $_SERVER['PATH_INFO']. In other configurations it may or may not be so passed. Rewriting incoming URLs to query string parameters is also possible, but requires that you be careful of encoding issues to ensure that all characters are handled correctly (Apache gets it wrong by default).
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Brian Carpenter wrote:
So what would cause my instance of MW to generate article links differently for some special characters? In my case, MW crafts the link to an article containing a ( in the title with %28 to replace the "(". But MW doesn't replace "." with "%2E" or replace "/"s with ""%2F" when creating links.
Why would it? Those are not special characters, they are allowed in URLs.
Please see RFC 3986.
-- brion vibber (brion @ pobox.com)
Wow. Your right again.. that's why your the expert and I'm the annoying novice..
BTW for any other poor Windows 2003 (W2K3) IIS ISAPI_Rewrite users, I submitted my RewriteRule to the ISAPI_Rewrite support forum at http://www.helicontech.com/forum/forum_topics-FID-2-PN-0.asp They provided the two new Rewriterules that work flawlessly on my wiki so far..
RewriteRule /wiki/([^?]+)(?:?(.+))? /index.php?title=$1?2&$2: [I,L]
RewriteRule /wiki/(?=Special)([\w:]+)/([\w:]+) /index.php?title=$1&target=$2 [I,L]
again, my physical location is
c:\wiki\MediaWiki\MediaWiki-1.6.3 LocalSettings.php statements: - - - - - - $wgScriptPath = ""; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; $wgArticlePath = "/wiki/$1"; - - - - - - - - -
Thanks Brion for your patience, availability and willingness to help, Brian
On 5/5/06, Brion Vibber brion@pobox.com wrote:
Brian Carpenter wrote:
So what would cause my instance of MW to generate article links
differently
for some special characters? In my case, MW crafts the link to an
article
containing a ( in the title with %28 to replace the "(". But MW doesn't replace "." with "%2E" or replace "/"s with ""%2F" when creating links.
Why would it? Those are not special characters, they are allowed in URLs.
Please see RFC 3986.
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Brian Carpenter wrote:
RewriteRule /wiki/(?=Special)([\w:]+)/([\w:]+) /index.php?title=$1&target=$2 [I,L]
Hmm, what's the point of this one? At best it looks redundant, at worst it may actively cause some special pages to fail that accept a parameter on the title but don't use "target" for the equivalent URL parameter.
-- brion vibber (brion @ pobox.com)
Apologies, The second one is a test rewrite rule for external authentication debugging. PLEASE IGNORE in previous!
I thought I was being helpful,oops. bc
On 5/5/06, Brion Vibber brion@pobox.com wrote:
Brian Carpenter wrote:
RewriteRule /wiki/(?=Special)([\w:]+)/([\w:]+) /index.php?title=$1&target=$2 [I,L]
Hmm, what's the point of this one? At best it looks redundant, at worst it may actively cause some special pages to fail that accept a parameter on the title but don't use "target" for the equivalent URL parameter.
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org