We use the standard LAMP solution, we store the articles in a MySQL database and create the web pages on the fly with PHP. Because of this, the URL:s become inherently ugly. So, to make things a bit more luser friendly, I decided to make "shortcuts" for the different article categories, so that you can type in http://mysite/blackmagic and then be transfered to http://mysite/snafu.php?cat=846983245&f ... &name=Gorg
My rewrite rule looks like this:
- Code: Select all
RewriteEngine On
RewriteRule ^/blackmagic.* http://%{HTTP_HOST}/snafu.php?cat=846983245&foo=XAH867Sa&name=Gorg
And it worked great, until recently. After doing some minor changes in httpd.conf and restarting httpd, I now get the following message:
"You can't access this file directly..."
I'd suppose this is because Apache is trying to open snafu.php?cat=846983245&foo=XAH867Sa&name=Gorg, in stead of just redirecting me there. But why? I was redirected before, but that just stopped happening. The changes I had done to httpd.conf before this problem occurred were rather small things (I don't remember exactly what, but I think it was adding ServerName and some stuff like that).
Does anyone have an idea what could be wrong?
/gustaf