2017-04-12 12 views
2

私の.htaccessはリダイレクトの問題

<IfModule mod_rewrite.c> 

    Options +FollowSymLinks 
    RewriteEngine on 

    RewriteRule ^([a-z0-9_-]+)\.html$ index.php/page/$1 [L] 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond $1 !^(index\.php|asset|robots\.txt) 
    RewriteRule ^(.*)$ index.php?/$1 [QSA,L] 

</IfModule> 

ですが、それは、私はいくつかの時間を試してみましたが、それは働いていないmochahostで働いていません。どうすればこの問題を解決できますか?

+0

........私の作品の.htaccessでこのコードを試してみてください – user4419336

+0

ライブサーバーでmod_rewriteが有効になっています – RiggsFolly

+0

これはどのようにmysqlに関連していますか? – dsharew

答えて

2

あなたはCodeIgniterのどのバージョンを使用していて、XAMPPやWAMPを使用していますか?

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L] 
</IfModule> 
+0

Gopalありがとうございます。それは私のために働く。 –