[pmwiki-users] I have a trouble about cleaning URL

H. Fox haganfox at users.sourceforge.net
Tue Dec 26 05:23:57 CST 2006


Shigeru Kobayashi <kotobuki <at> gmail.com> writes:
>
> Dear all,
>
> I have been trying to clean URL as described in the following web
> page, but I have a problem.
> http://www.pmwiki.org/wiki/Cookbook/CleanUrls#docroot
[...]
> The URL of the wiki is:
> http://gainer.cc/pmwiki/index.php
> (/gainer.cc/html/pmwiki/index.php)
>
> And I'd like to change the URL as follows:
> http://gainer.cc/index.php
> (/gainer.cc/html/)
>
> I created .htaccess file as follows:
> RewriteEngine On
> RewriteBase /
> RewriteRule ^$           pmwiki/pmwiki.php  [L]
> RewriteRule ^index\\.php$ pmwiki/pmwiki.php  [L]
> RewriteRule ^([^/a-z].*) pmwiki/pmwiki.php?n=$1  [QSA,L]
>
> But it seems that the rewriting does not work. Just to make sure, I
> also tried again by replacing "pmwiki/pmwiki.php" with
> "/gainer.cc/html/pmwiki/pmwiki.php", but got no luck.
>
> * Currently, for some reason, http://gainer.cc/index.php exists

Try removing one of the backslashes from the fourth line to get

   RewriteRule ^index\.php$ pmwiki/pmwiki.php  [L]

> to
> redirect from http://gainer.cc/ to old MediaWiki based wiki. When I
> confirmed, I renamed the index.php as _index.php.

If the above rule exists in your /gainer.cc/html/.htaccess file then
/gainer.cc/html/index.php should be ignored.  If it's not ignored then the
server is not rewriting URLs as advertised.

Hagan




More information about the pmwiki-users mailing list