首页 > 解决方案 > 长 url (rewrite mod) 子页面的问题

问题描述

我正在寻找知道主要代码的人

我的子页面名称难看www.forexample.eu/index_pl.php?src=home这个网址如何剪裁www.forexample.eu/start

请告诉我怎么做?

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/?$ index_pl.php?src=home=$1&subpage=$2 [L,QSA]

标签: urlurl-rewritingmod

解决方案


尝试以下操作:

RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^start index_pl.php?src=home [L]

如果您的链接是www.forexample.eu/start它会加载www.forexample.eu/index_pl.php?src=home“在后面”,但它仍会显示第一个链接。


推荐阅读