代码点火器启动器。htaccess
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了代码点火器启动器。htaccess相关的知识,希望对你有一定的参考价值。
### Turn on Rewrite Engine to remove index.php from URL <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteBase / #Removes access to the system folder by users. #Additionally this will allow you to create a System.php controller, #previously this would not have been possible. #'system' can be replaced if you have renamed your system folder. RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php/$1 [L] #Checks to see if the user is attempting to access a valid file, #such as an image or css document, if this isn't true it sends the #request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] # Force www. in the domain name. # RewriteCond %{HTTP_HOST} !^www.dreyervitals.com$ # RewriteRule ^(.*)$ http://www.dreyervitals.com/$1 [R=301] </IfModule>
以上是关于代码点火器启动器。htaccess的主要内容,如果未能解决你的问题,请参考以下文章
代码点火器 | .htaccess 从 url 中删除 index.php
Apache 2.4.6 default.conf 格式已更改。无法运行 .htaccess
您是不是必须重新启动apache才能使.htaccess中的重写规则生效?