一、apache伪静态
#apache 伪静态
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>
# apache伪静态接收Authorization 中 token
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
</IfModule>
# 获取header的apache伪静态写法
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
</IfModule>
#nginx 伪静态
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
二、阿里云全量镜像
//阿里云全量镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
//中国镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
//可以使用 composer config -l -g 查看所有全局配置
composer config -l -g
//Laravel China镜像
composer config -g repo.packagist composer https://packagist.laravel-china.org
//取消镜像
composer config -g --unset repos.packagist
镜像名 | 地址 | 赞助商 | 更新频率 | 备注 |
---|---|---|---|---|
阿里云 Composer 镜像 | https://mirrors.aliyun.com/composer/ | 阿里云 | 96 秒 | 推荐 |
腾讯云 Composer 镜像 | https://mirrors.cloud.tencent.com/composer/ | 腾讯云 | 24 小时 | - |
PHP 国内 Composer 镜像 | https://packagist.phpcomposer.com | 仁润股份 | 24 小时 | 不稳定 |
华为云 Composer 镜像 | https://repo.huaweicloud.com/repository/php/ | 华为云 | 未知 | 未知 |
php.cnpkg.org Composer 镜像 | https://php.cnpkg.org | 安畅网络 | 60秒 | - |
//中国镜像地址还原成默认地址:(注意:这个是将中国镜像还原)
composer config -g repo.packagist composer https://packagist.org
//在当前项目根目录可以使用 composer config -l 查看当前项目镜像配置
composer config -l
//移除某个包
composer remove pcakgist
三、 windows 定时任务脚本
#windows 定时任务脚本
C:
cd \phpstudy_pro\WWW\youku\public
C:\phpstudy_pro\Extensions\php\php7.3.4nts\php.exe index.php /index/Timedtask/index
四、 win10电脑设置固定ip
控制面板 网络和共享中心