[pmwiki-users] lots of problems when redirecting or rewriting URLs
DaveG
pmwiki at solidgone.com
Mon Jan 16 21:47:23 CST 2006
This method didn't work for me. Here's what I used to convert
from: http://207.210.84.86/~nepherim/pmwiki/pmwiki.php?n=Main.HomePage
to: http://207.210.84.86/~nepherim/pmwiki/Main/HomePage
My pmwiki install is in: http://207.210.84.86/~nepherim/pmwiki/
I created .htaccess in the pmwiki directory:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /~nepherim/pmwiki/
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^/?$ http://207.210.84.86/~nepherim/pmwiki/Main/
[R=permanent,QSA,L]
RewriteRule ^([^/a-z].*) pmwiki.php?n=$1 [QSA,L]
I added/changed config.php:
$BaseUrl = 'http://207.210.84.86/~nepherim';
$ScriptUrl = $BaseUrl.'/pmwiki';
$PubDirUrl = $BaseUrl.'/pmwiki/pub';
$UploadUrlFmt = $BaseUrl.'/pmwiki/uploads';
I created an index.php inside my pmwiki directory:
<?php include('pmwiki.php');
*What I'd like to expand this to is the same as Daniel is trying.*
I currently have:
http://207.210.84.86/~nepherim/pmwiki/Main/HomePage
I'd like to extend this to remove the "pmwiki":
http://207.210.84.86/~nepherim/Main/HomePage
Anyone have any ideas?
~ ~ Dave
H. Fox wrote:
> On 1/15/06, Daniel Friedmann <list at linuxing.de> wrote:
>
>>Hello
>>
>>I'm trying to shorten the URLs:
>>
>>from
>>http://spampal.de/pmwiki/pmwiki.php/Main/HomePage
>>
>>to
>>http://spampal.de/pmwiki/Main/HomePage
>>
>>or even better to
>>http://spampal.de/Main/HomePage
>
> [...]
>
>>I don't quite know what is the best working solution which is
>>recommended. This is very frustrating because I really tried dozens of
>>very similar and completely different solutions but haven't succeed so far.
>
>
> Here's what I use at http://qdig.sourceforge.net/ . (Yes, it goes
> against some of the advice on the CleanUrls page.)
>
> .htaccess (three lines):
>
> RewriteEngine on
> RewriteBase /
> RewriteRule ^([A-Z].*)
> /home/groups/q/qd/qdig/htdocs/index.php?pagename=$1 [L,qsappend]
>
> index.php:
>
> <?php
> chdir('site');
> include('pmwiki.php');
>
> site/local/config.php (excerpt)
>
> $EnablePathInfo = 1;
> $ScriptUrl = 'http://qdig.sourceforge.net';
> $PubDirUrl = 'http://qdig.sourceforge.net/site/pub';
>
> You may need to define some other directory locations such as
> $UploadDir and $UploadUrlFmt.
>
> ...
>
> I just tested on an internal server (shebang.example.com) and it works
> well there. Here are the files for that installation:
>
> /var/www/.htaccess
>
> RewriteEngine on
> RewriteBase /
> RewriteRule ^([A-Z].*) /var/www/index.php?pagename=$1 [L,qsappend]
>
> /var/www/index.php
>
> <?php
> chdir('site');
> include('pmwiki.php');
>
> /var/www/site/local/config.php (excerpt)
>
> $EnablePathInfo = 1;
> $ScriptUrl = 'http://shebang.example.com';
> $PubDirUrl = 'http://shebang.example.com/site/pub';
>
> /etc/apache/httpd.conf (excerpt, to enable .htaccess)
>
> <Directory /var/www/>
> AllowOverride FileInfo AuthConfig Limit
> </Directory>
>
> /var/www/site is just a symbolic link to /home/someuser/public_html/pmwiki .
>
> Hagan
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
>
More information about the pmwiki-users
mailing list