I've been using the URL rewriting method on many sites for many years.

Here is an example .htaccess file that may work for you:

RewriteEngine On
RewriteBase /
RewriteRule ^$       /wiki/pmwiki.php  [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([A-Z0-9\x80-\xFF].*)$ /wiki/pmwiki.php?n=$1 [QSA,L]

This is like the Example 2 on the CleanUrls page, modified to match your directory name (wiki instead of pmwiki) and your lack of index.php file.

And, in config.php, set these variables:

# set clean urls hear.beckman.illinois.edu/Courses/ECE537
$EnablePathInfo = 1;
$ScriptUrl = 'http://hear.beckman.illinois.edu';

## uncomment below if skins/attached files seem broken
# $FarmPubDirUrl = $PubDirUrl = 'http://hear.beckman.illinois.edu/wiki/pub';
# $UploadUrlFmt = 'http://hear.beckman.illinois.edu/wiki/uploads';

Petko

Jont Allen writes:
Dear Petko,
I tried all the methods on
http://www.pmwiki.org/wiki/Cookbook/CleanUrls

The alias method looked like it was going to work, but was unstable. I would get an error, and then the skin was lost, and I had to turn off the alias to recover. It also stopped rendering the LaTeX scripts.
I just couldn't get it to be stable.

In the end, the best I could do is
http://hear.beckman.illinois.edu/?n=Courses.ECE537-2013SpeechProcessing

There are two problems: I cannot get rid of "/n=" and
  Courses.ECE537
should have been
  Courses/ECE537

The . -> / is not a big deal, but I would really love to remove the "/n=" as students will be confused by this syntax.

The option
$EnablePathInfo = 1;
did not do it once I got rid of the /wiki/config.php/ part of the URL.

Are there more robust methods of doing this?

Jont Allen


Today's Topics:

    1. Re: help with name resolution (Petko Yotov)

----------------------------------------------------------------------

Message: 1
Date: Mon, 19 May 2014 19:50:48 +0200
From: Petko Yotov <5...@5ko.fr>
To: pmwiki-users@pmichaud.com
Subject: Re: [pmwiki-users] help with name resolution
Message-ID: <cone.1400521848.804036.26376.1000@pc4>
Content-Type: text/plain; format=flowed; delsp=yes; charset="UTF-8"

Will any of the described methods on this page be of some interest?

     http://www.pmwiki.org/wiki/Cookbook/CleanUrls

Petko

Jont Allen writes:
Dear pmwiki-users
Im having a name resolution problem. I dont know if the problem is with php
or apache.


My wiki is at
http://hear.beckman.illinois.edu/

This method resolves a desired page:
http://hear.beckman.illinois.edu/wiki/pmwiki.php?
n=Courses.ECE537-2013SpeechProcessing

But when I try to resolve the same page this way:
http://hear.beckman.illinois.edu/wiki/Courses/ECE5372013SpeechProcessing

it fails with an apache2 error
requested URL /wiki/Courses/ECE5372013SpeechProcessing was not found on this
server.

The wiki is installed at:
/var/www/wiki/

/var/www/wiki# ls
cookbook  docs  index.php  local  LS-LR  pmwiki.php  pub  scripts TODO.txt
uploads  uploads.tgz  wiki.d  wikilib.d

ls -l wiki.d/Courses.ECE537-2013SpeechProcessing
gives the content file:
/var/www/wiki# ls -l wiki.d/Courses.ECE537-2013SpeechProcessing
-rw-r--r-- 1 root root 109610 Dec 25 22:32
wiki.d/Courses.ECE537-2013SpeechProcessing

On to /etc/apache2:
the config file says:

<Directory /var/www/wiki/>
                  Options +Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  allow from All
          </Directory>

<Directory /var/www/wiki.d/>
                  Options +Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  allow from All
          </Directory>

   <Directory /var/www/wiki/Courses/ECE5372013SpeechProcessing/>
                  Options -Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  allow from All
          </Directory>

I did:
/etc/init.d/apache2 restart
   * Restarting web server apache2

What am I doing wrong
Is this a pmwiki or apache2 problem?



_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to