mod_rewrite and $_SERVER['PHP_SELF']

Hi All

I am using mod_rewrite to rewrite my url's. However, when I call $_SERVER['PHP_SELF'] it gives the actual page, and not the rewritten page. Is there any way I can get the rewritten pages instead?

i.e. www.domain.com/view.php?id=1 is rewritten as www.domain.com/1/Listing.php

Is there anyway I can get the "/1/Listing.php" instead of "view.php" returned?

Thanks
leapingleonAsked:
Who is Participating?
 
Ionut A. TudorConnect With a Mentor PHP ProgrammerCommented:
with $_SERVER['REQUEST_URI']
Cheers
0
 
leapingleonAuthor Commented:
Sometimes my laziness amazes even me. This forum just makes life too easy sometimes.

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.