Jump to content

Internal sever error happening with mod-rewrite, why!


dsaba

Recommended Posts

I'm quite sure that I'm messing up in the mod-rewrite syntax. Why? Well, I try something like this and I DONT get an internal server error and it works just fine:

RewriteEngine On
RewriteBase /q/
RewriteRule ^pic\.gif$ pic.php

 

 

HOWEVER, when I try doing this:

RewriteEngine On
RewriteBase /q/
RewriteRule ^/l/(.+?)\.gif$ pic.php?q=$1

 

I DO get an internal server error! :(

 

So If you can't see the expression i'm trying to do already, i'll explain it for you.

I have a directory named 'q' which is 1 past the root, from afar it will look like this:

root/q/  ->files are in here

 

So I write RewriteBase /q/

 

I want to redirect all urls formed like this:

http://root/q/l/jkasdlfj89u8923498234.gif      to      http://root/q/pic.php?u=jkasdlfj89u8923498234

 

You see the pattern here?

 

So how can I write it and it will work without internal server error? You saw my attempt already.

 

Thanks!

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.