.htaccess не работает и путаница

Я посмотрел на многочисленные вопросы, касающиеся .htaccess не работает.
Пробовал их все, но это все еще не будет работать для моего.

Это все еще работало для меня раньше, проблема началась, когда я удалил .htaccess файл в папке приложения.

Учебник, который я следовал, специально не упоминал, чтобы удалить этот htaccess, но просто скопировать его в корень. Таким образом, в основном, когда он еще работал, у меня было 2 файла htaccess, с папкой приложения и внутри папки приложения.

Прямо сейчас, даже если я удалил .htaccess файл внутри приложения, оставляя только 1 .htaccess в моем корне проекта, он все еще не будет работать.

I still have to include ‘index.php ‘ для url для работы.

Это не обязательно покажет мне 404, когда я не включаю индекс.РНР.

Он просто показывает мне эту страницу,

Введите описание изображения здесь

Это содержание мое .htaccess.

RewriteEngine on
RewriteCond 

I've looked at numerous questions regarding .htaccess not working. Tried them all but it still won't work for mine.

It was still working for me before, the problem started when i deleted the .htaccess file inside the application folder.

The tutorial i was following didn't specifically mention to delete that htaccess but just to copy it to the root. So basically, when it was still working i had 2 htaccess files, with the application folder and inside the application folder.

Right now, even if i deleted the .htaccess file inside the application leaving only 1 .htaccess in my project root, it still won't work.

I still have to include 'index.php' for the url to work.

It won't necessarily show me 404 when i don't include the index.php.

It just shows me this page,

enter image description here

This is the content of my .htaccess file.

RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

My config file.

$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

Apart from that, i already tried, refreshing my wamp connection, shutting down my pc then turning it on again.

I don't know whats wrong since it worked for me the first time around even if i have 2 htaccess it still won't. Something happened when i accidentally deleted that 1 file.

My system is windows 7 32-bit, and i'm using WAMP. I already turned on rewrite module for apache on my wamp. I'm using the latest codeigniter, 3.1.2

This may also give a hint,

When i load my view, the css url won't work.

The css url shouldv been localhost/project/css/bootstrap.min.css

however, same result, same page it shows above.

I also have this on my httpd.conf on my apache.

<Directory />
    AllowOverride none
    Require all denied
</Directory>

!^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /index.php/

I've looked at numerous questions regarding .htaccess not working.
Tried them all but it still won't work for mine.

It was still working for me before, the problem started when i deleted the .htaccess file inside the application folder.

The tutorial i was following didn't specifically mention to delete that htaccess but just to copy it to the root. So basically, when it was still working i had 2 htaccess files, with the application folder and inside the application folder.

Right now, even if i deleted the .htaccess file inside the application leaving only 1 .htaccess in my project root, it still won't work.

I still have to include 'index.php' for the url to work.

It won't necessarily show me 404 when i don't include the index.php.

It just shows me this page,

enter image description here

This is the content of my .htaccess file.

RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

My config file.

$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

Apart from that, i already tried, refreshing my wamp connection, shutting down my pc then turning it on again.

I don't know whats wrong since it worked for me the first time around even if i have 2 htaccess it still won't. Something happened when i accidentally deleted that 1 file.

My system is windows 7 32-bit, and i'm using WAMP. I already turned on rewrite module for apache on my wamp. I'm using the latest codeigniter, 3.1.2

This may also give a hint,

When i load my view, the css url won't work.

The css url shouldv been localhost/project/css/bootstrap.min.css

however, same result, same page it shows above.

I also have this on my httpd.conf on my apache.

<Directory />
    AllowOverride none
    Require all denied
</Directory>

[L]

Мой конфигурационный файл.

$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

Кроме того, я уже пытался, обновляя мое соединение wamp, выключив компьютер, а затем снова включив его.

Я не знаю, что неправильно, так как он работал для меня в первый раз, даже если у меня есть 2 htaccess, он все равно не будет. Что-то произошло, когда я случайно удалил этот 1 файл.

Моя система windows 7 32-разрядная, и я использую WAMP. Я уже включил модуль перезаписи для apache на моем wamp. Я использую последний codeigniter, 3.1.2

Это также может дать подсказку,

Когда я загружаю свое представление, url css не будет работать.

Url css должен быть localhost/project/css/bootstrap.min.css

однако тот же результат, та же страница он показывает выше.

У меня также есть это на моем httpd.conf on my apache.

<Directory />
    AllowOverride none
    Require all denied
</Directory>

1 ответ

  1. Я не уверен, почему это работает, но я нашел htaccess, который был специально упомянут для проблемы ci3 htaccess.

    RewriteEngine on
    RewriteCond 
    	

    I'm not sure why this works but i've found an htaccess that was specifically mentioned for a ci3 htaccess problem.

    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ index.php?$1 [L]
    

    not much difference, just that it removed the '/' before the index.php and replaced the '/' to '?' after the index.php

    Is this because i am using CI 3?

    Codeigniter 3 remove index.php problems

    !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ index.php?

    I'm not sure why this works but i've found an htaccess that was specifically mentioned for a ci3 htaccess problem.

    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ index.php?$1 [L]
    

    not much difference, just that it removed the '/' before the index.php and replaced the '/' to '?' after the index.php

    Is this because i am using CI 3?

    Codeigniter 3 remove index.php problems

    [L]

    не большая разница, просто он удалил ‘ / ‘ перед индексом.php и заменил ‘ / ‘на’?- после указателя.РНР

    Это потому, что я использую CI 3?

    Codeigniter 3 удалить индекс.проблемы php