开发者

apache htaccess - trailing slash and single entry point

开发者 https://www.devze.com 2023-04-01 22:33 出处:网络
I开发者_Python百科 need to have one entry point for my application - index.php. Before, i used to have such line of code:

I开发者_Python百科 need to have one entry point for my application - index.php. Before, i used to have such line of code:

RewriteRule ^(.*)$ /index.php [L]

Now, i need to force trailing slashes. I found out, that I can use such line:

RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [L,R=301]

But I want to know, how can I make it work both together.


try something like

RewriteRule ^(.*)$ /index.php/$1 [L]

or

RewriteRule ^(.*)$ http://%{HTTP_HOST}/index.php/$1/ [L]
0

精彩评论

暂无评论...
验证码 换一张
取 消