2014-12-27 95 views
0

我的前端是有角度的。我使用角度使用HTML5模式路由。我已经配置了我的htaccess文件,将任何URL重定向到index.php,但它似乎不起作用。在codeigniter中有htaccess的问题Angularjs

下面是我的htaccess代码:

Options +FollowSymLinks 

<ifModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_URI} !index 
    RewriteRule (.*) index.php/#/$1 [L] 
</ifModule> 

请帮助。

+0

在服务器端使用''#因为这是只有客户端的处理没有太大的意义。 – anubhava 2014-12-28 04:55:40

回答

0

改变这一行:

RewriteRule (.*) index.php/#/$1 [L] 

通过这样的:

RewriteRule ^(.*)$ /index.php?/#/$1 [L]