Forum

VisualPHPUnit configuration

MTGap
10 June 2013, 23:03
I'm trying to setup VisualPHPUnit, but I can't seem to get the redirects to work. The instructions for apache and nginx can be found here: https://github.com/NSinopoli/VisualPHPUnit?source=c#web-server-configuration
UrlToolkit {
ToolkitID = vpu
Match ^/VisualPHPUnit($) Rewrite /app/public/index.php
Match ^/VisualPHPUnit/(.*) Rewrite /app/public/$1
}

I don't seem to be redirected, but everything looks right when testing with wigwam. I'm trying to get the rewrite to work for: localhost/VisualPHPUnit

Hiawatha version: 9.1
Operating System: Chakra Linux
Hugo Leisink
11 June 2013, 19:40
Can you show me the content of the .htaccess file?
Hugo Leisink
12 June 2013, 00:08
I have no idea what goes wrong. Do you have an URL so I can see for myself?
MTGap
12 June 2013, 04:08
So I realized that I should be doing:

Match ^/VisualPHPUnit($) Rewrite /VisualPHPUnit/app/public/index.php
Match ^/VisualPHPUnit/(.*) Rewrite /VisualPHPUnit/app/public/$1

Since the files are in that folder, now I seem to be redirected correctly. However, it still doesn't work correctly. I did realize that there was another .htaccess file inside /VisualPHPUnit/app/public/ :

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !favicon.ico$
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

I'm not sure how to translate this one into the UrlToolkit.
Hugo Leisink
12 June 2013, 14:52
RequestURI exists Return
Match ^/favicon.ico$ Return
Match .*\?(.*) /index.php?$1
Match .* /index.php
MTGap
12 June 2013, 15:26
That one needs to apply only to the folder /VisualPHPUnit/app/public. I really hate this thing depending on .htacess files like this...

I'm trying this one, but I'm getting a redirect loop stuck at /VisualPHPUnit/index.php:

UrlToolkit {
ToolkitID = vpu
Match ^/VisualPHPUnit/app/public/favicon.ico$ Return
Match ^/VisualPHPUnit/app/public.*\?(.*) Rewrite /VisualPHPUnit/app/public/index.php?$1
Match ^/VisualPHPUnit/app/public.* Rewrite /VisualPHPUnit/app/public/index.php
Match ^/VisualPHPUnit($) Rewrite /VisualPHPUnit/app/public
Match ^/VisualPHPUnit/(.*) Rewrite /VisualPHPUnit/app/public/$1
}

This topic has been closed.