views:

31

answers:

2

Hi!

I would like to use mod_rewrite to transform a URL like this one:

http://example.com/qxs/app/myapp.qxs

into

http://example.com/qxs/index.php?page=myapp

Currently I have this:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^app/([^/\.]+).qxs /qxs/index.php?page=$1 [L]

But this ends up in an endless loop or something causing my PHP to report that the memory has exceeded and so on...

What am I doing wrong?

Thank you!

Morten

A: 

Try this rule:

RewriteRule ^app/([^/.]+)\.qxs$ qxs/index.php?page=$1 [L]
Gumbo
I was hoping for a quick answer but this was just insane!Worked like a charm! I just had to remove the ^app/ part and use an URL without this directory to make your rule work!But thank you! Solved!
Morten
A: 

If PHP is complaining then your RewriteRule has hit the server and the problem probably lies in the PHP code.

Ignacio Vazquez-Abrams