Jump to content

LightTPD - Help with rewrite conditions.


Recommended Posts

Hey there,

 

Basically I'm having an issue where once I have ported over my apache htaccess rules they no longer work on my LightTPD server here is the code that worked on apache:

 

RewriteEngine on
Options +FollowSymlinks
RewriteBase /

RewriteRule \.(css|jpe?g|gif|png|js)$ - [L]

RewriteRule ^([^/]*)$ index.php?v=$1 [NC,L]
RewriteRule ^([^/]*)/([^/]*)$ index.php?v=$1&uvara=$2 [NC,L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ index.php?v=$1&uvara=$2&uvarb=$3 [NC,L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ index.php?v=$1&uvara=$2&uvarb=$3&uvarc=$4 [NC,L]

 

And now the code that I converted to LightTPD:

 

url.rewrite-once = ( 
  "^([^/]*)$" => "index.php?v=$1",
  "^([^/]*)/([^/]*)$" => "index.php?v=$1&uvara=$2",
  "^([^/]*)/([^/]*)/([^/]*)$" => "index.php?v=$1&uvara=$2&uvarb=$3",
  "^([^/]*)/([^/]*)/([^/]*)/([^/]*)$" => "index.php?v=$1&uvara=$2&uvarb=$3&uvarc=$4"
)

 

But the conversion doesn't work? No value ever gets passed on the first parameter when one is specified as example.com/variable

 

Thanks for your time!

Link to comment
https://forums.phpfreaks.com/topic/254383-lighttpd-help-with-rewrite-conditions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.