我在Windows 7机器上启动并运行WampServer.它安装在C:/ wamp中.我使用C中的以下VirtualHosts设置了我的配置:/wamp/bin/apache/Apache2.2.1.7/conf/extras/httpd-vhosts
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "C:/wamp/www"
<Directory "C:/wamp/www">
Options Indexes Includes FollowSymLinks ExecCGI MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/DevelopmentServer/clickslide/webroot"
ServerName clickslide.loc
<Directory "C:/wamp/www/DevelopmentServer/clickslide/webroot">
Options Indexes Includes FollowSymLinks ExecCGI MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
DirectoryIndex index.html index.php
AccessFileName .htaccess
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我的服务器启动和停止正常,并提供HTML文件和PHP文件,但它忽略了我的.htaccess指令.我在我的Macintosh上安装了Apache的MAMP,htaccess运行正常.据说我觉得我在Windows上遗漏了一些明显的东西.
这是我的htaccess的内容
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
Run Code Online (Sandbox Code Playgroud)
我甚至尝试添加一些不会导致服务器错误的垃圾,所以我知道没有读取htaccess.
这是我的配置文件 …
我已经按照我在包装我的Webpack ReactJS应用程序进行生产时可以找到的许多技巧.不幸的是,文件大小仍然是3MB.我究竟做错了什么?
这是我的Webpack配置文件:
var path = require('path')
var webpack = require('webpack')
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle-webpack.js',
publicPath: './'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
warnings: false
}
})
],
module: {
loaders: [
{
test: /\.js$/,
loaders: [ 'babel' ],
exclude: /node_modules/,
include: __dirname
},
{
test: /\.css$/,
loader: "style-loader!css-loader"
},
{test: /node_modules\/react-chatview/, loader: …Run Code Online (Sandbox Code Playgroud)