Thinkphp The root of the framework .htaccess It's written like this :

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule> I try to write my own mvc The frame is
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
There's no front
+FollowSymlinks
Then you can only access http://localhost/mvc/index.php/user/show
You can't get rid of the middle index.php
http://localhost/mvc/user/show I also want to visit like this , image TP Just as hidden index.php It turns out that adding this sentence will hide index.php The function of 

.htaccess FollowSymlinks influence rewrite More articles about the function

  1. Ubuntu Upper opening Apache Rewrite Functional approach

    Ubuntu Upper opening Apache Rewrite Functional approach In this paper, ubuntn Turn on in the system apache Of urlrewrite Functional approach . stay Windows Upper opening Apache Of urlRewrite It's simple ...

  2. How to open Apache Rewrite function

    One .Ubuntu Default not on Rewrite Support apche Module loading has been spread across different configuration files , It seems more reasonable , It's also very convenient to manage . Let's see how to turn it on Rewrite modular , When users need to use 301 Redirect . ...

  3. htaccess URL rewrite rewrite And redirect redirect( turn )

    1. take .htm The page maps to .php 1 Options +FollowSymlinks 2 RewriteEngine on 3 RewriteRule ^(.*)\.htm$ $1.php [ ...

  4. charles Local debugging map and rewrite function

    charles Is a mac Next agent debugging tool , For the front-end development students, it is a very convenient tool to debug the interface : however charles There is a charge , But in China, almost every software that charges can find a way to crack it : Use charles front , Need to put cha ...

  5. nginx Server's rewrite function

    nginx When compiling, the default is rewrite Function Editor , But because rewrite You need to use regular expressions , So you need to install pcre Dependency package . yum install -y pcre pcre-install re ...

  6. ASP.NET Core How to realize Url rewrite function

    We can use ASP.NET Core To achieve Url rewrite function , Let's define a middleware ReplaceQueryStringMiddleware To replace Http In the request Url The parameter is Query ...

  7. CentOS Next Apache Turn on Rewrite function

    1.centos The configuration file is placed in : /etc/httpd/conf/httpd.conf Open the file and find : LoadModule rewrite_module modules/mod_rewrite.so ...

  8. Ubuntu Under boot Apache Of Rewrite function

    Execute... In the terminal sudo a2enmod rewrite After the instruction , That is to say Mod_rewrite modular . in addition , You can also do this by /etc/apache2/mods-available/rewrite.l ...

  9. How to be in Ubuntu Under boot Apache Of Rewrite function

    Execute... In the terminal sudo a2enmod rewrite After the instruction , That is to say Mod_rewrite modular . in addition , You can also do this by /etc/apache2/mods-available/rewrite.l ...

Random recommendation

  1. [ turn ]GC brief introduction

    [ turn ]GC brief introduction Link to the original text :http://www.cnblogs.com/cposture/p/4845189.html The original is so well written , Turn around here . 1 GC Mechanism 1.1 object From a computer point of view , Loading number ...

  2. Step by step Python3( 11、 ... and ) --3--  web And dom

    DOM                   Document object model (Document Object Model,DOM) It's a HTML and XML Documentation programming interface . It provides a structured representation of documents , You can change the ...

  3. ACM: POJ 1061 Frog dating - Special topic on number theory - Expand Euclid

    POJ 1061  Frog dating Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%lld & %llu  Descr ...

  4. Swift 1.1 Special case of language function parameter local parameter name external parameter name

    Swift 1.1 Special case of language function parameter local parameter name external parameter name 7.4   Special cases of function parameters When you define a function with parameters , The parameter name is defined for each parameter of the function . Depending on the form of the parameter name definition , Function parameters include local parameters and external parameters ...

  5. mac Medium xampp To configure xdebug

    [xdebug] zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/ ...

  6. Design mode summary 4--singleton pattern

    The singleton pattern Make sure there is only one instance of each class , And provide a global access point First step The second step in privatizing the construction method Examples obtained by public static methods Slacker type   public class Bank{ private Bank(){} pri ...

  7. oracle database 12c R1 Installation document

    INSTALLORACLE DATABASE 12C Complete installation document download address : http://download.csdn.net/detail/royjj/5665869 OS:ORALCE LINU ...

  8. DigitalOcean VPS brief introduction

    DigitalOcean Is a virtual machine service provider in the United States , Headquartered in New York, USA , Founded on 2012 year . Because of the low price , High performance configuration . The advantage of flexible layout , In recent years, it has developed rapidly , Become the favorite brand of Chinese webmaster circle .( visit http://w ...

  9. d3 Drawing different shapes based on data

    When drawing a force steering diagram, the nodes are usually round , But there are also company nodes drawn in circles , In the case of people drawing squares , So how do we draw different shapes based on data . You may first think of , It's very simple , It's time for the company append circle, When it's human ...

  10. oralce See if it starts land Create user Notes on common orders

    The simplest thing is to see if the process has : ps -ef | grep ora Next use oracle See the command of , such as : su - oracle sqlplus / as sysdba See if you can connect to the database . Create users and table spaces : ...