0
그래서 더 예뻐 뭔가 내 추한 PHP는 URL을 다시 작성했다 : mod_rewrite를 가진 prettified URL을 강제
http://www.example.com/main/details.php?gid=20&pid=5
이
로 리디렉션RewriteEngine On
RewriteRule ^main/photo([^/\.]+)/?.html$ main/details.php?gid=$2pid=$1
그러나, 지금은
가는 사람을 강제 할htto://www.example.com/main/photo5.html
다음 재 작성 시도 :
RewriteCond %{REQUEST_URI} ^/main/details\.php [NC]
RewriteRule ^main/details.php?gid=(.*)&pid=(.*) http://www.example.com/main/photo$1.html [R=301,L]
하지만 작동하지 않았습니다. 어떤 아이디어?
나는 photo.html? pid = 5로 보내집니다. –
@Lenni : 작성했습니다. – Gumbo
이제 photogid = 73 & .html로 리디렉션됩니다. 어느 부분이 % 1에 의해 캡처 된 것을 결정합니까? –