LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-06-2018, 08:19 AM   #1
jevgienij
LQ Newbie
 
Registered: Oct 2018
Posts: 3

Rep: Reputation: Disabled
Making URLs case insensitive for lighttpd


I have a small content download service for an old game. Unfortunatelly, it may call for a file using different upper/lowercase characters. That I can't change. Basically I need my webserver to accept request for a file i.e. /asd however it's requested - both http://localhost/asd and http://localhost/AsD etc. I've found that it is possible with Apache but I don't want to change webserver. Is it possible with lighttpd? So far I created an ntfs partition in a loop file which solves my problem but this is not the right or elegant way.
 
Old 10-07-2018, 04:09 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,767

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
I do this with links.
Actual dir is asd
Link to asd at ASD, AsD, etc.
 
Old 10-07-2018, 01:13 PM   #3
jevgienij
LQ Newbie
 
Registered: Oct 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Should I create a symlink containing every possibility for 500 files? That would be way too much symlinks. NTFS loop partition wins so far.
 
Old 10-07-2018, 04:32 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,767

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
I was suggesting links for the containing directory.
 
Old 10-08-2018, 12:38 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i wonder if these requests could be turned all lower-case before the server processes them.

when i enter LINUXQUESTIONS.ORG in my browser, it takes me to linuxquestions alright.
when i ping LINUXQUESTIONS.ORG, it pings alright.
 
Old 10-08-2018, 02:42 AM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,767

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by ondoho View Post
i wonder if these requests could be turned all lower-case before the server processes them.

when i enter LINUXQUESTIONS.ORG in my browser, it takes me to linuxquestions alright.
when i ping LINUXQUESTIONS.ORG, it pings alright.
Domain names are not case sensitive...only what’s after the first slash(/), and then only if the server is case sensitive...that is not windows.
 
Old 10-08-2018, 11:03 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ i see.
however, the solution should be much simpler than serving from an ntfs partition.
a simple regex url rewrite thingymajick in the server's config?
for apache, one could probably find this through a web search...
 
Old 11-04-2018, 05:47 PM   #8
nelz
Member
 
Registered: Aug 2004
Posts: 34

Rep: Reputation: 6
Add
Code:
server.force-lowercase-filenames = "enable"
to lighttpd.conf to force this server wide, otherwise use mod_rewrite.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Case insensitive Sharath Ravi Linux - Newbie 7 04-22-2014 02:51 AM
Checking of Case insensitive gregarion Programming 5 01-19-2010 11:09 PM
Apache Case Insensitive RiceAnis Red Hat 4 12-03-2009 08:45 AM
Case insensitive URL's subhashiniganeshan Linux - Server 1 10-08-2009 12:35 AM
Copying files from case-sensitive Linux to case-insensitive Windows via CIFS? SlowCoder Linux - General 4 05-07-2008 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration