After Apache upgrade, problems with htaccess

pepe / 2016-03-07 16:25:26   

Hi,

My hosting service changed to a new server and they upgraded Apache from 1.8 to 2.4.18.

After this upgrade, I have a problem with the Clean URL's. The link to the differents projects shows a "404 Not Found error". If I disable the mode_rewrite to "false" in config/options.php, then the links work fine.

The mode_rewrite works fine in my server and in the folders of my site. I tried to edit the htaccess with the recommendations from the tutorial of Clean URLs. I did the change "index.php --> /index.php" and it doesn't work. Mi hosting service says it probably be a syntaxis problem with the new Apache. They are making proofs with this, but the communication is very slow.

Now the htaccess rules are:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
#RewriteRule ^(.+) - [PT,L]
#RewriteRule ^(.+) index.php

Any suggestions?

Thanks.

pepe / 2016-03-09 11:13:33   

Solved. I have rewriting the htaccess with the same code that I see it works in another site with Wordpress in the same server.

The new code is:


RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

pepe / 2016-03-09 11:15:40   

Sorry, that's the old code, THIS is the new code:


RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

pepe / 2016-03-09 11:18:44   

WTF?? The first and the last line not appears ??

  1. <IfModule mod_rewrite.c>
  2. RewriteEngine On
  3. RewriteBase /
  4. RewriteRule ^index.php$ - [L]
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6. RewriteCond %{REQUEST_FILENAME} !-d
  7. RewriteRule . /index.php [L]
  8. </IfModule>

pepe / 2016-03-09 11:18:53   

Now.

This thread has been closed, thank you.