Bug 10139

Summary: Need to either get .htaccess turned on or these lines added to vhost conf
Product: freedesktop.org Reporter: Jon Phillips <jon>
Component: Account Modification RequestsAssignee: fd.o Admin Massive <sitewranglers>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: high    
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://create.freedesktop.org/
Whiteboard:
i915 platform: i915 features:

Description Jon Phillips 2007-02-28 23:27:05 UTC
Hiya, these are similar to the request for openfontlibrary, minus the rewrite for all URLs. This one is only for the wiki.

There are two courses of action. I would ideally like to have .htaccess support
so that I can catch any bots and change these lovely things without having to
trouble you all, but otherwise, please enable the second option. Oh, the wiki
bits are for making wiki paths easy to use and non-ugly as well. THX!


I would like to either get .htaccess support enabled. This is the best best option. 

OR

add this bit to the CREATE  vhost <Directory /> in the vhosts conf:

# anything that contains a dot without a colon should be left alone
RewriteRule ^wiki/(edit)/(.*)$ /wiki/index.php?action=$1&title=$2 [L,QSA]
RewriteRule ^wiki/insert/(.*)$ /wiki/index.php?action=edit&title=$1 [L,QSA]
RewriteRule ^wiki/(watch)/(.*)$ /wiki/index.php?action=$1&title=$2 [L,QSA]
RewriteRule ^wiki/(delete)/(.*)$ /wiki/index.php?action=$1&title=$2 [L,QSA]
RewriteRule ^wiki/(protect)/(.*)$ /wiki/index.php?action=$1&title=$2 [L,QSA]
RewriteRule ^wiki/(history)/(.*)$ /wiki/index.php?action=$1&title=$2 [L,QSA]


RewriteRule ^wiki/[^:]*\. - [L]
# anything that contains a slash without a colon should be left alone
RewriteRule ^wiki/[^:]*\/ - [L]
# redirect to main page
RewriteRule ^wiki/*$ /wiki/index.php?title=Main_Page [L,QSA]
# anything else is to be treated as a title
RewriteRule ^wiki/(.+)$ /wiki/index.php?title=$1 [L,QSA]
# anything that contains a slash is to be left alone


###


Thanks dudes!
Comment 1 Jon Phillips 2007-03-05 10:41:12 UTC
Can I help get this to happen faster? Please :)
Comment 2 Daniel Stone 2007-03-05 11:48:10 UTC
urgh.  mod_rewrite is extremely heavy, and i'd be worried about the load impact.  any chance you could redo those as RedirectMatches or Aliases?
Comment 3 Jon Phillips 2007-04-01 19:18:03 UTC
Ok, I figured out how to get the wiki to redirect properly with ALIAS.

Here is the generic overview:

http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url#Using_aliases_in_httpd.conf

We need to do this:

1.) mv /srv/create.freedesktop.org/create_web/wiki /srv/create.freedesktop.org/create_web/w

2.) Add this to the vhosts for create.freedesktop.org above (and outside) the <Directory />:

Alias /wiki /srv/create.freedesktop.org/create_web/w/index.php

3.) Update /srv/create.freedesktop.org/create_web/w/LocalSettings.php

Change the following vars to: 

$IP = "/srv/create.freedesktop.org/www/w";
$wgScriptPath       = "/w";
$wgArticlePath      = "/wiki/$1";


Then test and hope that my testing on my own system worked :) Ping me if problems.


####

That should then allow our wiki to have pretty URLs...thx...and it should be much much faster with ALIAS....

Comment 4 Jon Phillips 2007-04-04 15:08:23 UTC
Can I help anymore?
Comment 5 Jon Phillips 2007-04-17 00:00:36 UTC
Yet again, hope I can move this along. Is there anyway I can help?
Comment 6 Daniel Stone 2007-07-24 13:27:45 UTC
not a problem on twisp

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.