实时服务器中的重定向问题 [英] Redirection issues in Live server

查看:147
本文介绍了实时服务器中的重定向问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的.htaccess是

My .htaccess is

<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中不起作用,我尝试了几次,但没有起作用。我该如何解决这个问题?

But it's not working in mochahost I tried several time but it's not working. How can i solve this problem?

推荐答案

尝试.htaccess中的此代码对我有用.....

Try This Code in .htaccess works for me........

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

这篇关于实时服务器中的重定向问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆