2016-07-31 11 views
-1

ケース1とケース2が連携していません。 .htaccessファイルからケース2を削除すると、ケース1が動作します。ケース1の前にケース2を書き込むと、ケース1は動作しますが、ケース2は動作しません。リライトルール競合.htaccess

ケース1:

RewriteRule /(.*)\.html storycategory.php?story=$1 

例:

http://localhost/romoko1/story/bedroom.html 

ケース2:

RewriteRule /(.*)\.html tag.php?tag=$1 

例:

http://localhost/romoko1/tag/home-interior.html 
+0

'story /(.*).html storycategory.php?story = $ 1'と' tag /(.*).html tag.php?tag = $ 1'を試してみてください! –

+0

その仕事は大変です... –

+0

Okey!私の新しい答えをチェックしてください! –

答えて

0

あなたの.htaccessでこれを試してください:

<IfModule mod_rewrite.c> 

RewriteEngine On 

RewriteBase/

RewriteRule story/(.*).html storycategory.php?story=$1 
RewriteRule tag/(.*).html tag.php?tag=$1 

</IfModule> 

rewrite_moduleを有効にすることを忘れないでください。

私はこれがあなたに役立つことを願っています。

+0

#いいえそのサブディレクトリではありません RewriteBase/romoko1/ –

+0

私はlocalhostで作業しています。私は –

+0

のために書く必要があります。http://www.romoko.com/storycategory.php?slug=bedroom –

関連する問題