Welcome to WebmasterWorld Guest from 54.198.185.204

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Need help with mod rewrite and $ GET

Trying to get id from mod_rewrite

     
5:03 am on May 1, 2009 (gmt 0)

New User

5+ Year Member

joined:May 1, 2009
posts:24
votes: 0


I've mod_rewrite some links and now I can't use $_GET to get the id. What can I do with php to get my id?


http://localhost/background/category/id.html

I'm assuming one way is to get the url and get the id part out minus the html.

Tried the below just to see if I can get the url, but nothing shows.


$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
echo $url;

Is there anything more simple?

Thanks.

[edited by: Walley at 5:13 am (utc) on May 1, 2009]

5:18 am on May 1, 2009 (gmt 0)

New User

5+ Year Member

joined:May 1, 2009
posts:24
votes: 0


[localhost...]

Don't know the reason but I just added a different letter to it and it made a difference. Maybe because I two rewrites with the same name but their different pages.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members