[英]how to redirect url to specific url
我正在尝试将我的博客帖子重定向到特定网址https://example.com/detailblog.php?my-title&s=9
到https://example.com/my-title/9
RewriteEngine on
RewriteRule ^/blog/([0-9]+)\.php /blog/detailblog/.php?s=$1
RewriteEngine on
RewriteRule ^/blog/([0-9]+)\.php /blog/detailblog/.php?s=$1
它不起作用。
我建议阅读URL重写的初学者指南,如: https : //aloneonahill.com/blog/url-rewriting-for-beginners/,并使用以下测试工具: https : //htaccess.madewithlove.be/ 。
根据您提供的示例,在我看来,您还没有理解语法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.