I seem to have a configuration problem in relation to mod_rewrite.
The issue appears to be that once the rewrite happens successfully the
request is some how overwritten by an operation following the rewrite.
I am not certain what the "following" operation is at this time.
The initial request is to the root of the server which opens the index
file, index.php
Next, index.php is programmatically requesting "/setup" via php redirect
Then, "/setup" is rewritten to "/setup/installer.php" via a mod_rewrite
Finally, the path is some how overwritten again to use the directory
index and the server tries to load "/setup/index.php"
Here is the virtual host config for this application:
<VirtualHost 192.168.122.1:80>
ServerName 192.168.122.1
DocumentRoot "/var/www/Phraseanet/www"
<Directory "/var/www/Phraseanet/www">
DirectoryIndex index.php
Options +Indexes +FollowSymLinks -MultiViews
AllowOverride All
</Directory>
</VirtualHost>
Here is the rewrite rule (I removed several other rules for now to
make it easier to troubleshoot):
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^setup/.*$ /setup/installer.php [L]
</IfModule>
Here is the trace output from apache:
[perdir /var/www/Phraseanet/www/] strip per-dir prefix:
/var/www/Phraseanet/www/ ->
[perdir /var/www/Phraseanet/www/] applying pattern '^setup/.*$' to uri ''
[perdir /var/www/Phraseanet/www/] pass through /var/www/Phraseanet/www/
[perdir /var/www/Phraseanet/www/] strip per-dir prefix:
/var/www/Phraseanet/www/index.php -> index.php
[perdir /var/www/Phraseanet/www/] applying pattern '^setup/.*$' to uri
'index.php'
[perdir /var/www/Phraseanet/www/] pass through /var/www/Phraseanet/www/index.php
[perdir /var/www/Phraseanet/www/] strip per-dir prefix:
/var/www/Phraseanet/www/setup/ -> setup/
[perdir /var/www/Phraseanet/www/] applying pattern '^setup/.*$' to uri 'setup/'
[perdir /var/www/Phraseanet/www/] rewrite 'setup/' -> '/setup/installer.php'
[perdir /var/www/Phraseanet/www/] internal redirect with
/setup/installer.php [INTERNAL REDIRECT]
[perdir /var/www/Phraseanet/www/] strip per-dir prefix:
/var/www/Phraseanet/www/setup/index.php -> setup/index.php
[perdir /var/www/Phraseanet/www/] applying pattern '^setup/.*$' to uri
'setup/index.php'
[perdir /var/www/Phraseanet/www/] pass through
/var/www/Phraseanet/www/setup/index.php
If i request the page "setup/installer.php" directly, the page loads fine.
David
--
David Cramblett
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]