Probrem with RewriteRule after upgrade to CB 2.0 and apache 2.4

JohnyByk

Verified User
Joined
Mar 7, 2012
Messages
251
I have problem with that RewriteRule:
Code:
RewriteEngine On

RewriteRule ^isp/?([^-]+)$ http://new-site-domain/isp/$1 [P]
RewriteRule ^isp$ http://www.old-site-domain/isp/? [L]

RewriteRule ^/?(.*) http://new-site-domain/$1 [P]

In browser appear error:
HTML:
Not Found
The requested URL /index.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

index.html is in docroot but that should have no matter.
I'm sure that the problem is in this line (when i delete it error dosen't appear but RewriteRule dosen't work)
RewriteRule ^/?(.*) http://new-site-domain/$1 [P]

No errors in error_log and and user error log

It work's with CB1.2 and apache 2.2

How to solve this porblem?
 
Pretty sure your rewrite rules are just wrong.

If you're right, why work on Apache 2.2?
Maybe someone has a CB 2.0 and Apache 2.4 and may try similar rule?


EDIT
I noticed another problem.

If htacces file and index.html file are in docroot at the same time, htacces dosen't work properly (cekePHP for examle). Only delete index.html helps.
 
Last edited:
Back
Top