Join 3,561 readers in helping fund MetaFilter (Hide)


URL help?
April 8, 2011 1:47 PM   Subscribe

How do I change our wiki URL from www.name:port to www.name:port/wiki (where 'name' is the name of our support portal)?

Currently, the URLs of all the pages in our wiki look like this:

www.name:port/page1
www.name:port/page2
etc.

How do I make them look like:

www.name:port/wiki/page1
www.name:port/wiki/page2

What do I need to do to accomplish this? In your answer, please assume that I am a) technically inclined but know nearly nothing about web development/networking, and b) have no support from other teams and must find a way to do this myself (i.e., I can access resources, server, etc. if needed, but can't ask other people to help me). Thanks so much!
posted by methroach to Technology (7 answers total)
 
what wiki software are you using? what web server?
posted by jenkinsEar at 1:49 PM on April 8, 2011


Set up a redirect / rewrite in your .htaccess file. I'd have to google the exact code to do it as I do it so rarely I don't remember, but it is not hard. This assumes Apache as the web server.
posted by COD at 2:07 PM on April 8, 2011


I am using Confluence wiki and Apache web server.
posted by methroach at 2:19 PM on April 8, 2011


Based on what COD wrote: could I use something like this for help?
posted by methroach at 2:24 PM on April 8, 2011


Try enabling mod_rewrite and doing:
RewriteRule ^/(.*) /wiki/$1 [L]
posted by beerbajay at 2:40 PM on April 8, 2011


I'd actually amend Beerbajay's to include a conditional, so you don't end up with a redirect loop:
RewriteCond   %{REQUEST_URI}  !^/wiki/.*
RewriteRule   ^/(.*)          /wiki/$1     [L]

posted by jenkinsEar at 3:06 PM on April 8, 2011


There are two ways to make the new URLs work. One, which everyone has so far described, is to redirect the current URLs to the new URLs. A much simpler approach, though one which will break your old URLs, is to simply move the files, take all the current files and put them in a new directory named "wiki." Again, without any redirect, this will break all the old URLs, but depending on what you're doing, that may not be a problem.
posted by scottreynen at 9:43 PM on April 8, 2011


« Older Is handwriting analysis a vali...   |  I started a new job a month ag... Newer »
This thread is closed to new comments.