Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 代码点火器htaccess在godaddy上不工作?_.htaccess_Codeigniter_Codeigniter 2 - Fatal编程技术网

.htaccess 代码点火器htaccess在godaddy上不工作?

.htaccess 代码点火器htaccess在godaddy上不工作?,.htaccess,codeigniter,codeigniter-2,.htaccess,Codeigniter,Codeigniter 2,我最近搬到了godaddy Linux主机,而.htaccess似乎不起作用。由于.htaccess在本地xampp服务器和hostek服务器上运行,是否需要对godaddy进行任何设置。我收到“404未找到”错误消息。我正在使用CodeIgniter-2.2.1框架。我还检查了php.ini文件中加载模块中的mod_rewrite是否未找到,请从服务器端启用 我的htaccess文件位于部署我的应用程序的根目录上 RewriteEngine On RewriteCond $1 !^(index

我最近搬到了godaddy Linux主机,而.htaccess似乎不起作用。由于.htaccess在本地xampp服务器和hostek服务器上运行,是否需要对godaddy进行任何设置。我收到“404未找到”错误消息。我正在使用CodeIgniter-2.2.1框架。我还检查了php.ini文件中加载模块中的mod_rewrite是否未找到,请从服务器端启用

我的htaccess文件位于部署我的应用程序的根目录上

RewriteEngine On
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
请建议。

使用此

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

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

RewriteRule ^(.*)$ index.php/$1 [L,QSA]
喜欢

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

在Godaddy共享上工作:

RewriteEngine on
RewriteBase /
Options -Indexes
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/\?$1 [L]
这是我的工作:

RewriteEngine On
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

# !重要!在这里设置您的基础,不要忘记尾随和前导
#砍。
#如果您的页面位于
#  http://www.example.com/mypage/test1
#然后使用
#重写base/mypage/test1/
重新启动发动机
1美元^(索引\.php | resources | robots\.txt)
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$/path\u到/your\u网站/index.php?$1[L,QSA]

登录页的可能副本也显示了
404
错误??我已经尝试给出讨论过的堆栈溢出解决方案,但它对我不起作用。因此我共享了我的应用程序设置和httaccess来解决问题。@Girish:是,请检查URL:@SameekMishra下面的检查答案检查此链接此处的xml标记是否不区分大小写?
RewriteEngine On
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
<ifmodule mod_rewrite.c>

  # !IMPORTANT! Set your RewriteBase here and don't forget trailing     and leading
  #  slashes.
  # If your page resides at
  #  http://www.example.com/mypage/test1
  # then use
  # RewriteBase /mypage/test1/

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /path_to/your_website/index.php?$1 [L,QSA] 
</IfModule>