0

I had upgrade my server to apache 2.4. After doing some configuration some .htaccess file is not working.

Following .htaccess is not working. It jest return 404 error. But this URL is working in land area.

RewriteEngine On
RewriteRule ^(.*)$ http://10.0.2.40/LandBank/$1 [NC,P]

But following .htaccess is working.

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

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

How can it troubleshoot this?

Dinuka Thilanga
  • 4,220
  • 10
  • 56
  • 93
  • Is AllowOverride on in both contexts? Does gibberish in the first file trigger a 500? – covener Dec 15 '14 at 11:43
  • both .htaccess in same depth. /abc and /cde – Dinuka Thilanga Dec 15 '14 at 11:49
  • 1
    Maybe not even mod_proxy.so loaded and you get a 404 on proxy:/abc ? If mod_proxy is loaded and not mod_proxy_http, you' get a unique error message. – covener Dec 15 '14 at 11:50
  • but url is working in web browser in the server. – Dinuka Thilanga Dec 15 '14 at 11:58
  • Sorry, I don't understand that. Maybe you have a virtualhost problem if you mean it works over localhost from the server. You could add %f to your logformat to confirm where the server is looking. Maybe it's an unexpected directory that tells you the vhost is wrong. I would make sure virtualhost directives all start with "*:" – covener Dec 15 '14 at 12:00

1 Answers1

0

Depending on your exact version of Apache, you may have encountered the same Apache rewrite bug that bit me: Internal URL rewrite no longer working after upgrading Apache to 2.4

See the workaround I linked to there.

Community
  • 1
  • 1
LexLythius
  • 1,904
  • 1
  • 12
  • 20