我写道:
RewriteRule ^pu/([0-9]+)/? post_pu.php?id=$1 [L]
它有效,但是当我添加:
RewriteCond %{REQUEST_URI} ^/post_pu\.php$
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^(.*)$ /pu/%1/? [R=301,L]
我收到错误:"该页面未正确重定向"在页面http://11klassniki.ru/pu/1
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^pu/([0-9]+)/? post_pu.php?id=$1 [L]
RewriteCond %{REQUEST_URI} ^/post_pu\.php$
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^(.*)$ /pu/%1/? [R=301,L]
答案 0 :(得分:0)
我修复了:
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$