Use CodeIgniter (CI) to do the site's friends should be found that any URL of the site by default will bring a index.php, this from the perspective of SEO, the impact on the site is not small, but the URL of the beautiful, this is very uncomfortable, and below we will see how to remove the use of code Igniter developed the URL of the website inside the index.php these several characters bar.
Before you do this, make sure that the environment your site is running on supports using. htaccess for URL rewriting, and if you can, continue looking down:
Create a new. htaccess file at the site root and enter the following:
Rewriteengine Onrewritebase/rewritecond%{request_filename}!-frewritecond!^ (index\\.php|images|css|js|robots\\ . txt) rewriterule ^ (. *) $/index.php/$1 [L]
The above code line fourth means to exclude certain directories or files, so that these directories will not be rewrite to index.php, which is generally used in pictures, JS, CSS and other external resources. This means that non-PHP code should be excluded. (Here I ruled out the images directory CSS Directory js directory and robots.txt file, of course index.php should also be excluded)
Then find the application/config/config.php file and will:
$config [' index_page '] = "index.php";
Switch
$config [' index_page '] = "";
Articles you may be interested in
- How to remove ads from Dedecms background landing page
- thinkphp How to remove index.php from a URL
- How to optimize Web pages to increase the load speed of Web pages
- JavaScript string whitespace removal method Perfect Summary
- thinkphp How to intercept Chinese strings
- Shoulder, back muscle workout-pull up-bow row-prone to rise-standing posture weight leaning bent up-seated neck drop-down-sit at attention grip pull-neck width grip upward
- PHP BOM Removal tool, PHP batch removal of BOM code
- MySQL query with single quotation mark string and insert with single quote string need to pay attention to the problem
http://www.bkjia.com/PHPjc/764078.html www.bkjia.com true http://www.bkjia.com/PHPjc/764078.html techarticle use CodeIgniter (CI) to do the site's friends should be found that any URL of the site by default will bring a index.php, this from the perspective of SEO, the impact on the site is not big, but ...