Home >Backend Development >PHP Tutorial >Correct way to write htaccess files .htaccess file conversion iis htaccess php htaccess

Correct way to write htaccess files .htaccess file conversion iis htaccess php htaccess

WBOY
WBOYOriginal
2016-07-29 08:54:271108browse

只有关于PHP一点点的写入

<code><span>vi</span> .htaccess
    <span><IfModule mod_rewrite.c></span><span><span>RewriteEngine</span></span><span>on</span><span><span>RewriteCond</span></span><span>%{REQUEST_FILENAME}</span> !-d
    <span><span>RewriteCond</span></span><span>%{REQUEST_FILENAME}</span> !-f
    <span><span>RewriteRule</span></span> ^(.*)$ index.php/<span>$1</span><span> [QSA,PT,L]</span><span></IfModule></span></code>

在这之前需要开放mod_rewrite.so, 以及将AllowOverride None修改为Allowoverride All. 然后放入你的Apache的http.conf中定义的DocumentRoot目录下面.
OK , 大功告成. 这样就可以省去了thinkphp带来的index.php这个环节

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了htaccess文件的正确写入方式,包括了htaccess方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn