- 81
- 0
用的LINUX宝塔APACHE环境
只需要LINUX APACHE
求有技术的大神帮忙转换一下
或者提供一下对应的工具
万分感谢
rewrite ^/index.html$ /index.php;
rewrite ^/app.html$ /app.php;
rewrite ^/mv.html$ /mv.php;
rewrite ^/tv.html$ /tv.php;
rewrite ^/cx.html$ /cx.php;
rewrite ^/yy.html$ /yy.php;
rewrite ^/fun.html$ /fun.php;
rewrite ^/book.html$ /book.php;
rewrite ^/yule.html$ /yule.php;
rewrite ^/hall.html$ /hall.php;
rewrite ^/fuli.html$ /fuli.php;
rewrite ^/zhibo.html$ /zhibo.php;
rewrite ^/music.html$ /music.php;
rewrite ^/movie.html$ /movie.php;
rewrite ^/zongyi.html$ /zongyi.php;
rewrite ^/dongman.html$ /dongman.php;
rewrite ^/meipai.html$ /meipai.php;
rewrite ^/shop.html$ /shop.php;
rewrite ^/vod(.*)$ /play.php?play=$1;
rewrite ^/mvplay/(.*).html$ /mvplay.php?mv=$1;
rewrite ^/splay/(.*).html$ /splay.php?xiao=$1;
rewrite ^/fplay/(.*).html$ /fplay.php?yule=$1;
rewrite ^/cxplay/(.*).html$ /cxplay.php?id=$1;
rewrite ^/yplay/(.*).html$ /yplay.php?post=$1;
rewrite ^/movie_(.)_(.)_(.)_(.)_(.)_(.).html$ /movie.php?cat=$1&year=$2&area=$3&act=$4&rank=$5&pageno=$6;
rewrite ^/tv_(.)_(.)_(.)_(.)_(.)_(.).html$ /tv.php?cat=$1&year=$2&area=$3&act=$4&rank=$5&pageno=$6;
rewrite ^/dongman_(.)_(.)_(.)_(.)_(.*).html$ /dongman.php?cat=$1&year=$2&area=$3&rank=$4&pageno=$5;
rewrite ^/zongyi_(.)_(.)_(.)_(.)_(.*).html$ /zongyi.php?cat=$1&act=$2&area=$3&rank=$4&pageno=$5;
rewrite ^/gb_(.*).html$ /book.php?page=$1;
rewrite ^/cx_(.*)_([0-9]+).html$ /cx.php?cid=$1&page=$2;
rewrite ^/yy_(.*).html$ /yy.php?list=$1;
rewrite ^/fun_(.*)$ /fun.php?m=$1;
rewrite ^/yule_(.*)$ /yule.php?m=$1;
rewrite ^/mv_(.*)$ /mv.php?m=$1;
rewrite ^/star.html /star.php;
rewrite ^/mxstar_(.)_(.)_(.*).html /star.php?wd=$1&tab=$2&pageno=$3;
rewrite ^/seacher-(.*).html /seacher.php?wd=$1;
rewrite ^/news.html$ /news.php;
rewrite ^/news_([0-9]+).html$ /news.php?page=$1;
rewrite ^/content-([0-9]+)-([0-9]+).html$ /content.php?dz=/$1/$2.shtml;
rewrite ^/shop_(.*)$ /shop.php?page=$1;
- 共 0 条
- 全部回答
-
迊颩、榌舞 普通会员 1楼
在Apache环境中,要将NGINX的伪静态转换为Apache的伪静态,可以使用以下步骤:
- 在Apache的配置文件(通常是httpd.conf或htaccess)中,将要处理的静态资源的URL前缀替换为Apache的默认规则。例如,如果你有一个名为“index.html”的资源,你可以将它设置为“index.php”。
apache location ~ \.html { try_files $uri $uri/ /index.php?$args; }- 然后,你需要在PHP代码中使用Apache的重定向规则来处理这些请求。例如,你可以使用
RewriteEngine on来启用重定向,然后使用RewriteCond %{REQUEST_FILENAME} !-f来确保请求的文件名不是目录,最后使用RewriteRule ^(.*)$ index.php?$1来将请求的文件名替换为对应的文件名。
```php
```
这样,当用户访问一个以
.html开头的URL时,Apache会将请求重定向到Apache的默认规则中,然后使用PHP处理这个请求。
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部

