当前位置:网站首页>phpStudy设置301重定向
phpStudy设置301重定向
2022-06-23 05:06:00 【子蛟】
第一步:在 phpStudy 选项按钮中 - 配置文件中打开 -httpd-conf。然后搜索 #LoadModule rewrite_module modules/mod_rewrite.so 删除前面的#。
第二步:记事本打开网站根目录中 .htaccess 在任意位置加入以下代码:
RewriteEngine OnRewriteCond %{HTTP_HOST} ^369ok.cn [NC]
RewriteRule ^(.*)$ http://www.369ok.cn/$1 [L,R=301]
保存后,重启 Apache 即可
备注:如果 .htaccess 文件不存在,创建一个即可,如下:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^369ok.cn [NC]
RewriteRule ^(.*)$ http://www.369ok.cn/$1 [L,R=301]
</IfModule>
边栏推荐
- Pyinstaller sklearn reports errors
- 射频内容学习
- 原址 交换
- Given a node of a binary tree, return the successor node of the node
- 【踩坑记录】数据库连接未关闭连接,释放资源的坑
- Introduction to JVM principle
- Day_11 传智健康项目-图形报表、POI报表
- Illustration Google V8 18: asynchronous programming (I): how does V8 implement micro tasks?
- Remove the influence of firewall and virtual machine on live555 startup IP address
- Day_03 传智健康项目-预约管理-检查组管理
猜你喜欢

机器学习3-岭回归,Lasso,变量选择技术

Progress of layer 2 technical scheme

Day_06 传智健康项目-移动端开发-体检预约

Day_ 02 smart communication health project - appointment management - inspection item management

【Leetcode】431. Encode N-ary Tree to Binary Tree(困难)

又到半年总结时,IT人只想躺平

mongodb 4. X binding multiple IP startup errors

Day_13 傳智健康項目-第13章

Design scheme of Small PLC based on t5l1

The softing datafeed OPC suite stores Siemens PLC data in an Oracle Database
随机推荐
百度URL参数之LINK?URL参数加密解密研究(代码实例)
Day_ 03 smart communication health project - appointment management - inspection team management
Day_ 04 smart health project - appointment management - package management
同步开关电源降低EMI布局 dv/dt di/dt
How to add libraries for Arduino ide installation
Extend your kubernetes API using the aggregation API
11、 Realization of textile fabric off shelf function
Matplotlib savefig multiple picture overlay
Paper notes: multi label learning lsml
Linked Storage
Vite learning (I) - Introduction
CVE-2021-20038
Repeated DNA sequences for leetcode topic resolution
Difference between MySQL read committed and repeatability
Illuminate\Support\Collection 去重 unique 列表去重
279.完全平方数
How to query fields separated by commas in MySQL as query criteria - find_ in_ Set() function
Remove duplicates from sorted list II of leetcode topic resolution
Design scheme of Small PLC based on t5l1
C语言去除字符串尾部的换行(或其他字符)