0
我有以下htaccess文件。問題是goto page2.php轉到page1.php,像這樣page3.php轉到page1.php。htacces重寫規則衝突與其他網址
Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteBase /bookshow/
RewriteCond %{THE_REQUEST} /page1\.php\?name=([^\s&]+) [NC]
RewriteRule^%1? [R=302,L]
RewriteCond %{THE_REQUEST} /page2\.php\?id=([^\s&]+) [NC]
RewriteRule^%1? [R=302,NE,L]
RewriteCond %{THE_REQUEST} /page3\.php\?cat=([^\s&]+) [NC]
RewriteRule^%1? [R=302,NE,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/?$ page1.php?name=$1 [L,NE,QSA,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/?$ page2.php?id=$1 [L,NE,QSA,NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)/?$ page3.php?cat=$1 [L,NE,QSA,NC]
你想做什麼。它確定它在哪裏,但它應該去哪裏? –
page1.php和page3.php工作正常。但是,當GOTO PAGE2.PHP IT LANDS在PAGE1.PHP這是問題。 page2.php必須轉到page2.php – user3680502
什麼是解決方案? – user3680502