Forum Moderators: phranque
I have several files that use upper-case letters, e.g. addURL.html, FAQ.html, etc.
Ocassionally, I see errors because the request was for lower-case. e.g. addurl.html, faq.html.
Is there a way to allow or match to no-case? Something like this:
RewriteCond %{HTTP_HOST}!^$ [NC] Thanks
Good guess.... [httpd.apache.org...]
But since the pattern will match *anything* that is not blank, you don't need the [NC] flag in the example you posted.
Jim
OK, I think I figured out your question...
Mod_rewrite can't easily be set up to do case conversion. You could do something like:
RewriteCond %{REQUEST_URI} !^widget\.html$
RewriteRule ^widget\.html$ http://example.com/widget.html [NC,R=301,L]
You should investigate using mod_speling [httpd.apache.org] instead; It will identify "close matches" for requested pages, including spelling and capitalization errors.
Jim