ThinkPHP uses the Rewrite rules of the. htaccess file to hide index. php in the URL and remove index. php from the URL.
ThinkPHP, as a PHP framework, is a single portal, so its original URL is not so friendly. However
ThinkPHP provides various
Remove the index.php from the URLThinkphp as a PHP framework, is a single entry, then its original URL is not so friendly. But thinkphp provides a variety of mechanisms to customize the desired URL format, in conjunction with Apache. htaccess files,
Remove index. php from the URL
Thinkphp, as a PHP framework, is a single portal, so its original URL is not so friendly. However, thinkphp provides various mechanisms to customize the desired URL format. In combination with the Apache. htaccess file,
Teaches you how to use. htaccess in the CI framework to hide index. php in a url. Adhering to the idea of MVC architecture, all controllers in CI need to load the call through the single point of entry file index. php (default. That is to say, by
Htaccess is an Apache server configuration file, with powerful features, this article describes how to edit the file, let the Web site to block a country IP network segment, prevent pictures, file hotlinking, protect the directory and files under
Author: aolinks
The. htaccess file is the most commonly used configuration file on the Apache server. It is used to configure web pages under the relevant directory. The htaccess file can help us achieve: webpage 301 redirection, custom 404 error
The. htaccess file is the most commonly used configuration file on the Apache server. It is used to configure web pages under the relevant directory. The htaccess file can help us achieve: webpage 301 redirection, custom 404 error pages, changing
Original: thinkphp Use the Rewrite rule in the. htaccess file to hide index.php in the URLURL rewritingThe usual URL contains index.php, in order to achieve a better SEO effect may need to remove the URL inside the index.php, through the way of URL
Only a little bit of writing about PHP
vi .htaccess
RewriteEngineonRewriteCond%{REQUEST_FILENAME} !-d RewriteCond%{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
Before this, you need to open mod_rewrite.so and
Make the. htaccess file take effectIn windows2003, how does one configure apache to support. htaccess? The method is as follows:1. In the Apache configuration file httpd. conf, find # LoadModule rewrite_module modules/mod_rewrite.so, and remove the "
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.