htaccess rewrite URL does not work with codeigniter code

前端 未结 1 812
自闭症患者
自闭症患者 2021-01-29 03:34

I am trying to rewrite URLS so that /foo -> index.php.

index.php is powered by codeigniter 3. bar.php is a stand alone php file.

This is a snipped from my .htac

1条回答
  •  天涯浪人
    2021-01-29 03:51

    Take a look at https://gist.github.com/keithmorris/3023560

    This includes a fairly standard htaccess file that I use on all my projects. You then use the CI routing functionality to define where different bits go.

    Bear in mind with CI you can pass additional elements in a url such as example.com/foo1/foo2/foo3/query1/query2.

    0 讨论(0)
提交回复
热议问题