homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

.htaccess rewrite directives to work on Lighttpd

 9:40 am on Dec 22, 2013 (gmt 0)


How can I convert this Apache rewrite rules so they work on Lighttpd?

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule www.(.*) web.php?url=$1
RewriteRule sitemap/(.*) mapdi.php?page=$1
RewriteRule tags_(.*)\.html$ tags.php?keywords=$1
RewriteRule ^([^-]*)-page-([^-]*)\.html$ tags.php?keywords=$1&page=$2 [L]
RewriteRule ^sitemap_([^-]*)\.html$ sitemap_web.php?page=$1 [L]
RewriteRule ^sitemap\.html$ sitemap.php$1 [L]
RewriteRule ^privacy\.html$ privacy.php$1 [L]

I converted some part of the code, but not sure how I can convert

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$


Here is what I could convert:

url.rewrite-once = (

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$

"www.(.*)" => "web.php?url=$1",
"sitemap/(.*)" => "mapdi.php?page=$1",
"tags_(.*)\.html$" => "tags.php?keywords=$1",
"^([^-]*)-page-([^-]*)\.html$" => "tags.php?keywords=$1&page=$2",
"^sitemap_([^-]*)\.html$" => "sitemap_web.php?page=$1",
"^sitemap\.html$" => "sitemap.php$1",
"^privacy\.html$" => "privacy.php$1"


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved