htAccess 文件在服务器上不起作用,在本地主机上工作时重定向不正确


htaccess file not working on server and redirecting not properly while working on localhost

我正在服务器上设置一些东西,

http://adamcyber.net/talentmasterdemo/

如果我复制数据库和应用程序并将其运行到 localhost,则将配置更改为本地主机设置(如路径和子目录)一切正常。但是当我上传它时,服务器 adamcyber.net。登录页面工作正常,但是当我使用凭据登录时。它进入重定向的无限循环。所以火狐显示错误。到目前为止,我发现这是htaccess问题,但我不确定y htaccess是否在本地主机上工作而不是在服务器上工作,该配置为正确运行htaccess,因此运行htaccess没有问题,因为服务器上的其他站点正在正确运行htaccess。下面是 htaccess 文件代码。

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule    (.*) index.php/$1 [L]

我被困在这里。任何帮助将不胜感激。

试一试

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index'.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>