View Single Post
02-11-2011, 09:55 PM
#1
jasonladue is offline jasonladue
Status: I'm new around here
Join date: Feb 2011
Location: Joplin, MO, USA
Expertise: Design & Building basic sites
Software: DreamWeaver, Photoshop, FileZi
 
Posts: 9
iTrader: 0 / 0%
 

jasonladue is on a distinguished road

  Old  Help with case sensitivity issues

I am building a small site for a client, and he is wanting a text box on the home page where someone can put in a code and be taken to another page in the site.

The easiest way I found to do this was with the following code.
The part is in the header
<script>
function changeURL(){
window.location =
document.getElementById('txtbx').value + ".php";
}
</script>

This part is in the body.
ACCESS CODE:&nbsp;<input type="text" value="" id="txtbx" />
<input type="button" value="Submit" onmousedown="changeURL();" />

This code does what we want, for the most part. The issue is that he has mailed out the flyers with the code 7STAR. I therefor named the page 7STAR.php and when the code is entered in all caps, it works great. The problem is that we can't count on everyone actually putting it in all caps. The client also has expressed that he does not want me to put a message on the page about all caps. (he has the site exactly how he wants it in his head and is not open to any variation from that. (I'm sure most of the rest of you have had an occasional client like that)).

What I need to know is if there is a way to use HTACCESS to automatically redirect if someone puts in 7Star or 7star. I would also be open to some javascript that may change it on the homepage when someone keys it in.

I appreciate any help anyone can offer on this.