Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

Short URLs

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


ed.melendez at pipelinefinancial

Dec 6, 2007, 1:36 PM

Post #1 of 15 (1369 views)
Permalink
Short URLs

I've been attempting for several weeks now to get my installation on
Mediawiki to print its URL's as follows:

http://server.mydomain.com/wiki/index.php/Main_Page

Here is my system/setup info:

Red Hat EL 3
Apache 2.0.46
PHP 4.3.2-33 (running in module mode to Apache - I think???)

DocumentRoot "/var/www/html"
Mediawiki files located in: /var/www/html/wiki

LocalSettings.php
$wgScriptPath = "/wiki";
$wgScript = "$wgScriptPath/index.php";
$wgRedirectScript = "$wgScriptPath/redirect.php";

$wgArticlePath = "$wgScript/$1";
#$wgArticlePath = "$wgScript?title=$1";

Thanks in Advance,
-Ed



Disclaimer: Any references to Pipeline performance contained herein are based on historic performance levels which Pipeline expects to maintain or exceed but nevertheless does not guarantee. Congested networks, price volatility, or other extraordinary events may impede future trading activities and degrade performance statistics.
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


thomas.dalton at gmail

Dec 6, 2007, 1:57 PM

Post #2 of 15 (1323 views)
Permalink
Re: Short URLs [In reply to]

On 06/12/2007, Ed Melendez <ed.melendez [at] pipelinefinancial> wrote:
> I've been attempting for several weeks now to get my installation on
> Mediawiki to print its URL's as follows:
>
> http://server.mydomain.com/wiki/index.php/Main_Page

What actually happens? What is it that's going wrong?

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


schneelocke at gmail

Dec 6, 2007, 2:00 PM

Post #3 of 15 (1316 views)
Permalink
Re: Short URLs [In reply to]

2007/12/6, Ed Melendez <ed.melendez [at] pipelinefinancial>:
> I've been attempting for several weeks now to get my installation on
> Mediawiki to print its URL's as follows:
>
> http://server.mydomain.com/wiki/index.php/Main_Page
>
> Here is my system/setup info:
>
> Red Hat EL 3
> Apache 2.0.46
> PHP 4.3.2-33 (running in module mode to Apache - I think???)
>
> DocumentRoot "/var/www/html"
> Mediawiki files located in: /var/www/html/wiki
>
> LocalSettings.php
> $wgScriptPath = "/wiki";
> $wgScript = "$wgScriptPath/index.php";
> $wgRedirectScript = "$wgScriptPath/redirect.php";
>
> $wgArticlePath = "$wgScript/$1";
> #$wgArticlePath = "$wgScript?title=$1";
>
> Thanks in Advance,
> -Ed

Have you got any rewrite rules set in your .htaccess or httpd.conf?
http://www.mediawiki.org/wiki/Manual:Short_URL has a bunch of info
that you may find useful if not.

--
schnee

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


ed.melendez at pipelinefinancial

Dec 6, 2007, 2:08 PM

Post #4 of 15 (1314 views)
Permalink
Re: Short URLs [In reply to]

I'm getting Error 404 and the following in my error_log file:

[Thu Dec 06 15:57:36 2007] [error] [client xx.xx.xx.xx] File does not
exist: /var/www/html/wiki/index.php/Main_Page

-Ed


-----Original Message-----
From: mediawiki-l-bounces [at] lists
[mailto:mediawiki-l-bounces [at] lists] On Behalf Of Thomas
Dalton
Sent: Thursday, December 06, 2007 16:57
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Short URLs

On 06/12/2007, Ed Melendez <ed.melendez [at] pipelinefinancial> wrote:
> I've been attempting for several weeks now to get my installation on
> Mediawiki to print its URL's as follows:
>
> http://server.mydomain.com/wiki/index.php/Main_Page

What actually happens? What is it that's going wrong?

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Disclaimer: Any references to Pipeline performance contained herein are based on historic performance levels which Pipeline expects to maintain or exceed but nevertheless does not guarantee. Congested networks, price volatility, or other extraordinary events may impede future trading activities and degrade performance statistics.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


ed.melendez at pipelinefinancial

Dec 6, 2007, 2:08 PM

Post #5 of 15 (1326 views)
Permalink
Re: Short URLs [In reply to]

I've tried using a rewrite rule, but (1) I couldn't find an example that
exactly matches what I want, and (2) none of the ones I did try worked.

I'm afraid I don't know enough about rewrite rules to properly
troubleshoot why it isn't working.

-Ed


-----Original Message-----
From: mediawiki-l-bounces [at] lists
[mailto:mediawiki-l-bounces [at] lists] On Behalf Of
Schneelocke
Sent: Thursday, December 06, 2007 17:01
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Short URLs

2007/12/6, Ed Melendez <ed.melendez [at] pipelinefinancial>:
> I've been attempting for several weeks now to get my installation on
> Mediawiki to print its URL's as follows:
>
> http://server.mydomain.com/wiki/index.php/Main_Page
>
> Here is my system/setup info:
>
> Red Hat EL 3
> Apache 2.0.46
> PHP 4.3.2-33 (running in module mode to Apache - I think???)
>
> DocumentRoot "/var/www/html"
> Mediawiki files located in: /var/www/html/wiki
>
> LocalSettings.php
> $wgScriptPath = "/wiki";
> $wgScript = "$wgScriptPath/index.php";
> $wgRedirectScript = "$wgScriptPath/redirect.php";
>
> $wgArticlePath = "$wgScript/$1";
> #$wgArticlePath = "$wgScript?title=$1";
>
> Thanks in Advance,
> -Ed

Have you got any rewrite rules set in your .htaccess or httpd.conf?
http://www.mediawiki.org/wiki/Manual:Short_URL has a bunch of info
that you may find useful if not.

--
schnee

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Disclaimer: Any references to Pipeline performance contained herein are based on historic performance levels which Pipeline expects to maintain or exceed but nevertheless does not guarantee. Congested networks, price volatility, or other extraordinary events may impede future trading activities and degrade performance statistics.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


thomas.dalton at gmail

Dec 6, 2007, 2:12 PM

Post #6 of 15 (1322 views)
Permalink
Re: Short URLs [In reply to]

On 06/12/2007, Ed Melendez <ed.melendez [at] pipelinefinancial> wrote:
> I'm getting Error 404 and the following in my error_log file:
>
> [Thu Dec 06 15:57:36 2007] [error] [client xx.xx.xx.xx] File does not
> exist: /var/www/html/wiki/index.php/Main_Page

Sounds like a problem with either Apache or PHP not recognising "/" as
a valid way to refer to parameters. I'm not sure what the config
option is, but there's probably something you need to turn on in your
apache config file (or possibly php.ini). (You'll probably be able to
find it just by looking at the file, it might be there but commented
out or something.)

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


schneelocke at gmail

Dec 6, 2007, 2:15 PM

Post #7 of 15 (1324 views)
Permalink
Re: Short URLs [In reply to]

Hi Ed,

> I've tried using a rewrite rule, but (1) I couldn't find an example that
> exactly matches what I want, and (2) none of the ones I did try worked.
>
> I'm afraid I don't know enough about rewrite rules to properly
> troubleshoot why it isn't working.

Here's what I'm using:

RewriteEngine on
RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]

The actual MediaWiki installation resides in /w/, while pretty URLs
use /wiki/ (e.g. /wiki/Main_Page etc.). If having different
directories there is OK for you, the above or some variation thereof
should work.

--
schnee

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


ed.melendez at pipelinefinancial

Dec 6, 2007, 2:43 PM

Post #8 of 15 (1319 views)
Permalink
Re: Short URLs [In reply to]

I really must use the exact URL as stated previously, and the location
of files is quite important as well.

What accompanying changes have you made in you LocalSettings.php file.

-Ed


-----Original Message-----
From: mediawiki-l-bounces [at] lists
[mailto:mediawiki-l-bounces [at] lists] On Behalf Of
Schneelocke
Sent: Thursday, December 06, 2007 17:16
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Short URLs

Hi Ed,

> I've tried using a rewrite rule, but (1) I couldn't find an example
that
> exactly matches what I want, and (2) none of the ones I did try
worked.
>
> I'm afraid I don't know enough about rewrite rules to properly
> troubleshoot why it isn't working.

Here's what I'm using:

RewriteEngine on
RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]

The actual MediaWiki installation resides in /w/, while pretty URLs
use /wiki/ (e.g. /wiki/Main_Page etc.). If having different
directories there is OK for you, the above or some variation thereof
should work.

--
schnee

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Disclaimer: Any references to Pipeline performance contained herein are based on historic performance levels which Pipeline expects to maintain or exceed but nevertheless does not guarantee. Congested networks, price volatility, or other extraordinary events may impede future trading activities and degrade performance statistics.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


schneelocke at gmail

Dec 6, 2007, 2:49 PM

Post #9 of 15 (1319 views)
Permalink
Re: Short URLs [In reply to]

Hi Ed,

> I really must use the exact URL as stated previously, and the location
> of files is quite important as well.
>
> What accompanying changes have you made in you LocalSettings.php file.

$wgScriptPath = "/w";
$wgArticlePath = "/wiki/$1";

--
schnee

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


thomas.dalton at gmail

Dec 7, 2007, 6:04 AM

Post #10 of 15 (1317 views)
Permalink
Re: Short URLs [In reply to]

On 06/12/2007, Ed Melendez <ed.melendez [at] pipelinefinancial> wrote:
> I really must use the exact URL as stated previously, and the location
> of files is quite important as well.

What you're trying to do isn't short urls, short urls is where you
don't have "index.php" in the url (well, I guess that's actually
"pretty urls", but you wouldn't normally shorten urls without making
them pretty). You shouldn't need any kind of rewrites. I think you
just need to configure php/apache correctly.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


ed.melendez at pipelinefinancial

Dec 7, 2007, 6:28 AM

Post #11 of 15 (1322 views)
Permalink
Re: Short URLs [In reply to]

Whether it's rewrites or configuration of Apache/PHP... I could use
assistance.

Thanks,
-Ed


-----Original Message-----
From: mediawiki-l-bounces [at] lists
[mailto:mediawiki-l-bounces [at] lists] On Behalf Of Thomas
Dalton
Sent: Friday, December 07, 2007 09:04
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Short URLs

On 06/12/2007, Ed Melendez <ed.melendez [at] pipelinefinancial> wrote:
> I really must use the exact URL as stated previously, and the location
> of files is quite important as well.

What you're trying to do isn't short urls, short urls is where you
don't have "index.php" in the url (well, I guess that's actually
"pretty urls", but you wouldn't normally shorten urls without making
them pretty). You shouldn't need any kind of rewrites. I think you
just need to configure php/apache correctly.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Disclaimer: Any references to Pipeline performance contained herein are based on historic performance levels which Pipeline expects to maintain or exceed but nevertheless does not guarantee. Congested networks, price volatility, or other extraordinary events may impede future trading activities and degrade performance statistics.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


ed.melendez at pipelinefinancial

Dec 7, 2007, 7:33 AM

Post #12 of 15 (1314 views)
Permalink
Short URLs [In reply to]

Per the following link:

http://www.mediawiki.org/wiki/Apache_configuration#PHP_as_Apache_Module

It states:

"Be sure to enable mod_php in the directory that contains the MediaWiki
scripts"

Does anyone know how to explicitly do this?

Thanks Again,
-Ed



Disclaimer: Any references to Pipeline performance contained herein are based on historic performance levels which Pipeline expects to maintain or exceed but nevertheless does not guarantee. Congested networks, price volatility, or other extraordinary events may impede future trading activities and degrade performance statistics.
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Platonides at gmail

Dec 7, 2007, 7:40 AM

Post #13 of 15 (1314 views)
Permalink
Re: Short URLs [In reply to]

Ed Melendez wrote:
> Whether it's rewrites or configuration of Apache/PHP... I could use
> assistance.
>
> Thanks,
> -Ed


That url should directly work, and if it's available the installer
usually autoconfigures it. The 404 comes from the server, so you need to
configure apache.
Try setting: AcceptPathInfo On


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


ed.melendez at pipelinefinancial

Dec 7, 2007, 9:25 AM

Post #14 of 15 (1307 views)
Permalink
Re: Short URLs [In reply to]

That works!!!!

Thanks,
-Ed


-----Original Message-----
From: mediawiki-l-bounces [at] lists
[mailto:mediawiki-l-bounces [at] lists] On Behalf Of Platonides
Sent: Friday, December 07, 2007 10:40
To: mediawiki-l [at] lists
Subject: Re: [Mediawiki-l] Short URLs

Ed Melendez wrote:
> Whether it's rewrites or configuration of Apache/PHP... I could use
> assistance.
>
> Thanks,
> -Ed


That url should directly work, and if it's available the installer
usually autoconfigures it. The 404 comes from the server, so you need to

configure apache.
Try setting: AcceptPathInfo On


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Disclaimer: Any references to Pipeline performance contained herein are based on historic performance levels which Pipeline expects to maintain or exceed but nevertheless does not guarantee. Congested networks, price volatility, or other extraordinary events may impede future trading activities and degrade performance statistics.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


emufarmers at gmail

Jul 22, 2008, 5:26 PM

Post #15 of 15 (1100 views)
Permalink
Re: Short URLs [In reply to]

On Tue, Jul 22, 2008 at 11:33 AM, Jon Welters <jwelters [at] gmail> wrote:

> All,
>
> I've managed to get short urls working in the form of
> http://wiki.com/articlename . However I'm experiancing a slight issue with
> the fact that for some reason everything works except for system functions
> such as Logging in or out. I'm assuming there's a scripting variable set
> wrong.
>
>
> From LocalSettings.php
> The URL base path to the directory containing the wiki;
> ## defaults for all runtime URL paths are based off of this.
> $wgScriptPath = "http://beta:8000";
> $wgScriptExtension = ".php";
> $wgScript = "";
>
> #Added for short URL
> $wgArticlePath = "/$1";
>
> Apache Configuration
>
> # allows people to use the old syntax.... surprisingly it works. I still
> experiencing the same scripting issue with or without this rule
> Redirect /index.php http://ii:8000
> Alias /skins /var/www/beta/skins
> Alias /index.php /var/www/beta/index.php/
> Alias / /var/www/beta/index.php/
>
> Any help would be greatly appreciated. This short URL scheme seems to work
> pretty well, aside from the obvious issue.
>
> --
> Thank You and Sincerely,
> Jon
>

$wgScriptPath looks strange. As far as I know, it's supposed to be a path
relative to the Web root, not a hostname.
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.