在根目录下添加文件 .htaccess

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#如果页面出现"No input file specified." 请注释第一条,启用第二条
RewriteRule ^(.*)$ $.php [QSA,PT,L]
#RewriteRule ^(.*)$ index.php/$ [QSA,PT,L]
#RewriteRule ^(.*)$ index.php [E=PATH_INFO:$,QSA,PT,L]
</IfModule>

apache 隐藏 index.php的更多相关文章

  1. linux服务器中Apache隐藏index.php失败

    可以通过URL重写隐藏应用的入口文件index.php,下面是相关服务器的配置参考: [Apache] httpd.conf配置文件中加载了mod_rewrite.so模块 AllowOverride ...

  2. [记录] Linux Apache隐藏index.php

    1. 在项目更目录下新建 .htaccess <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEng ...

  3. Apache 隐藏 index.php,如将 tp5.com/index.php/hello/123 变成 tp5.com/hello/123

          以Apache为例,需要在index.php入口文件的同级添加.htaccess文件,内容如下: <IfModule mod_rewrite.c> Options +Follo ...

  4. ThinkPHP CI codeignitor 框架 apache 重写 url 隐藏index.php 服务器 报错:Object not found! 可能是.htaccess隐藏index.php

    隐藏index.php可以去掉URL地址里面的入口文件index.php,但是需要额外配置WEB服务器的重写规则.以Apache为例,需要在入口文件的同级添加.htaccess文件(官方默认自带了该文 ...

  5. centos apache 隐藏和伪装 版本信息

    1.隐藏Apache版本信息 测试默认 apache 的状态信息[root@1314it conf]# curl -Is localhostHTTP/1.1 200 OKDate: Tue, 16 N ...

  6. Apache 隐藏入口文件以及防盗链.htaccess 文件

    Apache 隐藏入口文件以及防盗链.htaccess 文件 RewriteEngine on # 隐藏入口文件 RewriteCond %{REQUEST_FILENAME} !-d Rewrite ...

  7. 隐藏index.php

    以 Apache 为例,需要在入口文件的同级添加 .htaccess 文件(官方默认自带了该文件),内容如下:<IfModule mod_rewrite.c>Options +Follow ...

  8. yii框架 隐藏index.php 以及美化URL(pathinfo模式访问)

    首先我们分步骤来: 安装好 yii 以后  我们看到的url地址如下所示: http://www.3w.com/MyApp/backend/web/index.php?r=site%2Flogin 我 ...

  9. ThinkPHP5 隐藏index.php问题

    隐藏index.php 可以去掉URL地址里面的入口文件index.php,但是需要额外配置WEB服务器的重写规则. 以Apache为例,需要在入口文件的同级添加.htaccess文件(官方默认自带了 ...

随机推荐

  1. 元组(tuple)基本操作

    1.定义元组,Python的元组和列表类似,不同之处在于元组中的元素不能修改(因此元组又称为只读列表),且元组使用小括号而列表使用中括号 dimensions.py , ) print(dimensi ...

  2. spring mvc请求过程

    spring mvc处理请求过程 1.    首先客户端发送一个HTTP请求,Web服务器接收这个请求,如果匹配DispatcherServlet的请求映射路径,web容器将请求转交给Dispatch ...

  3. IIS日志存入数据库之一:ODBC

    园内@Fish Li的文章<IIS日志-网站运维的好帮手>中介绍将IIS的文本格式的文件导入数据库的方法.在实践中,我们发现导数据的速度很慢,一个200M的日志文件居然要近100分钟.我们 ...

  4. redhat安装docker

    一.禁用selinux 由于Selinux和LXC有冲突,所以需要禁用selinux.编辑/etc/selinux/config,设置两个关键变量.     SELINUX=disabled  SEL ...

  5. VS2017+EF+Mysql生成实体数据模型(解决闪退的坑) 版本对应才行

    最近要使用VS2017+EF+Mysql,在生成实体数据模型踏过一些坑,在此做个总结. 1.先下载并安装 mysql-connector-net-6.9.10.msi  和  mysql-for-vi ...

  6. 关于C++中字符串与数字的互相转换

    方法搬自博客:  Qt数据类型转换  侵删 1. 把QString转换为double类型 //法一: QString str="123.45"; double val=str.to ...

  7. OCP 062大量考试新题(2019年)-12

    12. Your database is configured in archivelog mode. Examine the RMAN configuration parameters: CONFI ...

  8. Dubbo实现原理之基于SPI思想实现Dubbo内核

    dubbo中SPI接口的定义如下: @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public ...

  9. Xshell 配色方案

    [wsp] text=cOc0c0 cyan(bold)=50ebfc text(bold)=9999e8 magenta=7b5175 green=008000 green(bold)=1cc470 ...

  10. Data - 数据思维

    数据思维 数据思维全解析 如何建立数据分析的思维框架 做数据分析时,你的方法论是什么? 数据分析全流程资料,适合各路人马 百度内部培训资料PPT:数据分析的道与术 学会数据分析背后的挖掘思维,分析就完 ...