How would I make Apache case insensitive using .htaccess?

后端 未结 2 469
野性不改
野性不改 2021-01-04 01:58

I recently switched from IIS to Apache and unfortionately some of my links have capitalization issues. I have seen quite a few people talking about how to rewrite urls to be

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-04 02:28

    add

    CheckSpelling on
    

    to your .htaccess file of course after enabling the RewriteEngine

    so the final code will be

    RewriteEngine on
    CheckSpelling on
    

    I guess it is the best and safest way.

    dont forget to change

    AllowOverride none
    

    to

    AllowOverride All
    

    inside your httpd.conf file, to allow .htaccess files to work correctly.

提交回复
热议问题