index : index在互联网上表示网站的默认主页. 一般为 index.html index.htm index.asp index.php: 另外的默认主页也多用default.html;default.htm等. RewriteCond : RewriteCond指令定义一条规则条件.在一条RewriteRule指令前面可能会有一条或多条RewriteCond指令,只有当自身的模板(pattern)匹配成功且这些条件也满足时规则才被应用于当前URL处理. RewriteRule : 它…
在apache的httpd.conf加入,需要把LoadModule rewrite_module modules/mod_rewrite.so前面的“#”去掉 DocumentRoot / <Directory />    Options Indexes FollowSymLinks MultiViews    AllowOverride None    #AllowOverride All <IfModule mod_rewrite.c>  RewriteEngine on  …
0.apache下面和index.php同一个目录下面的 .haccess <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?s=/$ [QSA,PT,L] </IfModule> 1.centos的配置文件放在: /etc/httpd/conf/h…
  在APACHE服务器上的访问方式上去除index.php   下面我说下 apache 下 ,如何 去掉URL 里面的 index.php 例如: 你原来的路径是: localhost/index.php/index 改变后的路径是: localhost/index 1.httpd.conf配置文件中加载了mod_rewrite.so模块 //在APACHE里面去配置 #LoadModule rewrite_module modules/mod_rewrite.so把前面的警号去掉 2.在A…
由于项目需要,用ThinkPHP开发的程序链接要去除index.php下面说下如何解决.一.Nginx方法 由于nginx不支持PATH_INFO,所以需要进入linux终端找到nginx 的配置文件nginx.conf添加如下代码: location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$ last; break; } } 使用如下: server { listen ; server_name www.blh…
http://www.365mini.com/page/apache-options-directive.htm Options指令是Apache配置文件中一个比较常见也比较重要的指令,Options指令可以在Apache服务器核心配置(server config).虚拟主机配置(virtual host).特定目录配置(directory)以及.htaccess文件中使用.Options指令的主要作用是控制特定目录将启用哪些服务器特性. Options指令常见的配置示例代码如下: <Direc…
一.配置httpd.conf: 1.取消Include conf/extra/httpd-vhosts.conf的注释,代码如下: # Virtual hostsInclude conf/extra/httpd-vhosts.conf 2.虚拟域名关联项目根目录(入口文件index.php的根目录),代码如下: <VirtualHost *:80> ServerName www.fuckoff.com DocumentRoot "D:/Apache2.2/htdocs/web&quo…
单入口文件配置 webpack.config.js const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin');//自动生成html模板,以便在多个入口文件时,不用手动修改引入的js module.exports = { entry: './src/index.js', plugins: [//配置html-webpack-plugin new HtmlWebpackPlugin({…
一级域名(baidu.com)也叫作顶级域名,注册一级域名是需要付费的. 而二级域名(image.baidu.com)是一级域名的延伸,所以只要购买了一级域名,二级域名是可以任意配置的. 其实(www.baidu.com)也是二级域名,只是大家已经习惯使用www为前缀的二级域名作为网站的主域名而已. 通过DNS解析服务商,可以为每个二级域名绑定不同的主机IP,这样即使只有一个主域名也可以架设多个网站了. 如果你只有一台主机,并且要在上面建立多个项目,还得通过子域名的方式访问,那么你需要配置 Ap…
通过Apache配置可以限制用户对目录的访问,会弹出像phpadmin一样的登陆框. =========================================================== 1)建立需要保护的目录 ①在/usr/local/apache2/htdocs/下建立目录,然后保护,或者②. ②使用别名(httpd-autoindex.php),在系统位置建立目录,然后保护. 在httpd-autoindex.php文件中建立别名目录: Alias /soft/ "/sh…