vBulletin 5 + lighthttpd url rewriting

Posted by Boots on Server Fault See other posts from Server Fault or by Boots
Published on 2012-10-25T00:58:19Z Indexed on 2012/10/25 17:02 UTC
Read the original article Hit count: 173

Filed under:
|
|

I'm trying to get vBulletin 5 up and running under lighttpd but I'm having some problems with url rewriting. Here is the apache .htaccess provided by vBulletin.

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

#needed because admincp is an actual directory.
RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
</IfModule>

If this helps, this is the IIS config provided by vBulletin

<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is to support redirection in IIS.  It is harmless if you are running under Apache -->
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Main Redirect" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:1}" />
                </rule>
                <rule name="Admincp" stopProcessing="true">
                    <match url="^(admincp/)$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

Anyone have any suggestions as to the lighttpd url.rewrite equivalent? All my experiments have failed thus far.

I'm running lighttpd-1.4.31-1

I tried this but it didn't work. I think it has something to do with me not properly emulating [QS] in the .htaccess

url.rewrite-once = ("^(.*)$" => "index.php?routestring=$1",
                    "^(admincp/)$)" => "index.php?routestring=$1")

This has gotten me closer but not fully functional yet.

url.rewrite-if-not-file = ("^(.*)$" => "index.php?routestring=$1",
                    "^(admincp/)$)" => "index.php?routestring=$1")

© Server Fault or respective owner

Related posts about mod-rewrite

Related posts about lighttpd