重定向并使用.htaccess文件重写我的URL?

lkaoscv7  于 2023-08-06  发布在  其他
关注(0)|答案(1)|浏览(155)

重定向并使用**.htaccess文件重写我的URL**?
重复的内容,2链接相同的内容。
第一个月
请重定向到下面的URL
https://www.pooeen.com/viewtopic.php?t=30
我期待着尽快收到你的来信。
预先感谢您的宝贵合作。

  1. <IfModule mod_rewrite.c>
  2. RewriteEngine On
  3. RewriteBase /
  4. RewriteCond %{THE_REQUEST} ^GET\\ .\*/index\\.(php|html)\\ HTTP
  5. RewriteRule ^(.\*)index\\.(php|html)$ /$1 \[R=301,L\]
  6. </IfModule>

字符串

mfuanj7w

mfuanj7w1#

使用所显示的示例,请尝试以下.htaccess规则。

  1. RewriteEngine ON
  2. ##Using THE_REQUEST for catching references and using them later on.
  3. RewriteCond %{THE_REQUEST} \s/(viewtopic\.php)\?f=(?:[^&]*)&(t=\d+)\s [NC]
  4. RewriteRule ^ /%1?%2 [R=301,L]

字符串

相关问题