これは私のテストです.htaccess
RewriteEngine On
Options +FollowSymLinks
#WWW redirect WORKS
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^home/$ index.php [L] #THIS RULE WORKS
RewriteRule ^news/(.+)/$ /news.php?page=$1 [L] #not works
RewriteRule ^news/(.+)/$ /news.php?article=$1 [L] #not works
RewriteRule ^news/$ news.php [L] #WORKS
私はこれを作りたい:
"news.php" => "news/"
"news.php?page=3" => "news/3/"
"news.php?article=lorem-ipsum-3" => "news/lorem-ipsum-3/"
この url ルールでは、このような url はうまく機能しますが、私が望むものではありません:
http://www.xxxxxx.com/news/?page=3 #works
http://www.xxxxxx.com/news/?article=lorem-ipsum-2 #works
.htaccess を修正するにはどうすればよいですか?
ありがとう