mod_rewrite doesn't work

ralphje

Verified User
Joined
Jun 4, 2005
Messages
8
I am hosting my website on a shared host, E-Dentify NL, but since they updated or at least did something with the server, the following doesn't work anymore:

www.ralphje.nl/download/file/1234 --> www.ralphje.nl/download.php?action=file&id=1234

while

www.ralphje.nl/download --> www.ralphje.nl/download.php

Still works.

This is my .htaccess that worked before but now doesn't work anymore. It seems that if I clear this complete .htaccess, the latest example still works. My host only refuses to fix the problem. Therefore I hope you can tell me the problem and I can pass this information to them. However, there's no .htacces above the public_html (till the highest level I can see, /home/ralphjenl/)

Code:
RewriteEngine on
RewriteBase /

(... part without any errors ...)

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([0-9-]+)/?$ $1.php?action=$2&id=$3

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ $1.php?action=$2

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([A-Za-z0-9-]+)/?$ $1.php

I hope someone recognises this problem and can help me.
 
Last edited:
You should ask your hosting provider the same thing you've asked here, as only they know what changes they've made.

Jeff
 
That's the problem: They don't know what they did. The completely re-installed the server (my site was down for several hours) and they exactly said:

"This problem is too complicated to fix - we have tried several things, but we can't locate the problem. We recommend you to don't use mod_rewrite."
 
Then you've got a problem.

We can't figure it out because it requires forensic research on their server.

I guess your choice is to do without a fundamental resource you need, or do something you can't do.

Or in other words, you're between a rock and a hard place.

Jeff
 
Maybe they have to turn on mod_rewrite in apache conf. I can imagine that it is turned off after a reinstall
 
By default mod_rewrite isn't specifically configured by domain; it's either on or off for all accounts.

And by default, it's on.

Jeff
 
can u atleast get the hosting company to see the error logs as it might tell something why the RewriteRules are breaking.
 
Back
Top