如何重定向键入我的网站的特定URL的所有用户,无论他们键入的cAsE如何?

Consider this example:

I have a website called www.mycoolwebsite.com, and I have got a special directory named specialdirectory under the root, and I would like to redirect all the visitors who type:

www.mycoolwebsite.com/specialdirectory

www.mycoolwebsite.com/SpecialDirectory

www.mycoolwebsite.com/SPEciALdIRectOry

www.mycoolwebsite.com/speCIalDIrecToRy

I mean, irrespective of what 'cAsE' they use, I would like to redirect all the traffic to the same location: www.mycoolwebsite.com/specialdirectory

Any help would be greatly appreciated.

Cheers. :)

You need use .htaccess file in your root site witn [NC] flag. Try some like this:

RewriteEngine On
RewriteCond %{REQUEST_URI} [NC]
RewriteRule .* http://www.mycoolwebsite.com/specialdirectory [R=301,L,NC]