NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Converting .htaccess to lighttpd.conf

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
4 members in live chat ~  


Reply
 
LinkBack Thread Tools
Old 07-29-2010, 09:29 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
snike's Avatar
Join Date: Mar 2006
Location: USA
Posts: 497
snike has a spectacular aura aboutsnike has a spectacular aura about
 


Save a Life

Converting .htaccess to lighttpd.conf


I need some help converting this .htaccess file to lighttpd.conf. Can anyone help me out?

Code:
RewriteEngine On
RewriteRule ^film/(.*).html$ /index.php?typ=films&ef=$1 [QSA]
RewriteRule ^video/(.*).html$ /index.php?typ=videos&ef=$1 [QSA]
Thanks in advance!
snike is offline   Reply With Quote
Old 07-30-2010, 11:43 AM   #2 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,074
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
looking at the documentation located at Lighttpd - Docs:ModRewrite - lighty labs the following should be what you need:
????: NamePros.com http://www.namepros.com/programming/669586-converting-htaccess-to-lighttpd-conf.html

Code:
url.rewrite-once = ( "^film/(.*).html$" => "/index.php?typ=films&ef=$1" )
url.rewrite-once = ( "^video/(.*).html$" => "/index.php?typ=videos&ef=$1" )
It simply uses regular expressions as mod rewrite does.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline   Reply With Quote
Old 11-13-2010, 05:16 PM THREAD STARTER               #3 (permalink)
NamePros Regular
 
snike's Avatar
Join Date: Mar 2006
Location: USA
Posts: 497
snike has a spectacular aura aboutsnike has a spectacular aura about
 


Save a Life
I tried the above code and although it makes complete sense, it isn't working for me. I have lighttpd installed, and I have checked that the module mod_rewrite is enable. It is. However, I am still not able to get this code working correctly. I remember having it work at one point but I don't remember what I did. Any suggestions on how to diagnose what the issue is? Any help is appreciated. Thank you!
snike is offline   Reply With Quote
Old 11-14-2010, 03:27 AM   #4 (permalink)
NamePros Regular
 
carob's Avatar
Join Date: Mar 2009
Posts: 537
carob is a name known to allcarob is a name known to allcarob is a name known to allcarob is a name known to allcarob is a name known to allcarob is a name known to all
 



HI in your original you have QSA to append a query string.

In the documentation linked above at the end you find this:

Quote:
Passing / Matching the Query string (GET variables)¶
????: NamePros.com http://www.namepros.com/showthread.php?t=669586

If you wanna pass the Query String (?foo=bar) to the rewrite destination you have to explicitly match it:

url.rewrite-once = (
"^/news/([^\?]+)(\?(.*))?" => "/news.php?title=$1&$3"
)
carob is online now   Reply With Quote
Old 12-13-2010, 10:49 AM   #5 (permalink)
Account Suspended
Join Date: Dec 2010
Posts: 1
bornowen is an unknown quantity at this point
 



would recommend that you take a look at this thread which provides a basic guide to convert mod rewrite rule apache to lighttpd is

RewriteRule ^dmca-policy.html$ dmca-policy.html [L]
RewriteRule ^sitemap.xml$ sitemap.xml [L]
bornowen is offline   Reply With Quote
Old 12-20-2010, 09:10 PM   #6 (permalink)
NamePros Member
Join Date: Nov 2010
Posts: 34
pausch is an unknown quantity at this point
 



Peter i followed the process given by you and i am succeeded to convert htaccess to lighttpd.Thanks
pausch is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 01:17 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger