0

これは私のURLです:

http://www.mysite.com/mypage.php?PropertyBuyRent=rent&Developer=&Resort=&City=&State=&Country=&Price=

次のhtaccessを書きたい:

PropertyBuyRent=rent で、Resort の値が空でない場合、URL は次のようになります。

http://www.mysite.com/mypage.php/TimeshareForRent/Marriott 's+Grande+Ocean+Resort (リゾートの URL から得られる値は何でも)

4

1 に答える 1

0

次のルールを使用できます。

RewriteEngine On

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+(testing/mypage\.php)\?PropertyBuyRent=rent&Developer=&Resort=([^&]+)&City=&State=&Country=&Price= [NC]
RewriteRule ^ /%1/TimeshareForRent/%2? [R=301,L,NE]

RewriteRule ^(testing/mypage.php)/TimeshareForRent/([^/]+)/?$ /$1?PropertyBuyRent=rent&Developer=&Resort=$2&City=&State=&Country=&Price= [L,NC,QSA]
于 2013-10-09T15:00:45.930 に答える