• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 632
  • Last Modified:

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
0
leapingleon
Asked:
leapingleon
1 Solution
 
Ionut A. TudorPHP 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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now