agha.faisal Posted May 19, 2008 Share Posted May 19, 2008 hi, suppose there is some site url www.xyz.com if any user type in the address bar like this www.xyz.com/abc www.xyz.com/def www.xyz.com/ghi remember there are no directories like abc,def,ghi i want to know only the text after www.xyz.com i want to get the url address in php or using javasript. thanks Link to comment https://forums.phpfreaks.com/topic/106375-have-u-the-power-in-php-then-try-to-do-this-little-challenge/ Share on other sites More sharing options...
MadTechie Posted May 19, 2008 Share Posted May 19, 2008 your need to write a mod-rewrite (see apache .htaccess file) this can then point the abc to a get ie ?param=$1 $_GET['param'] would be abc example (untested) RewriteEngine on RewriteRule ^index.php/(.*) ?index.php?param=$1 Link to comment https://forums.phpfreaks.com/topic/106375-have-u-the-power-in-php-then-try-to-do-this-little-challenge/#findComment-545285 Share on other sites More sharing options...
Caesar Posted May 19, 2008 Share Posted May 19, 2008 My suggestion, use .htaccess/Apache rewrites. Link to comment https://forums.phpfreaks.com/topic/106375-have-u-the-power-in-php-then-try-to-do-this-little-challenge/#findComment-545288 Share on other sites More sharing options...
MadTechie Posted May 19, 2008 Share Posted May 19, 2008 Which is exactly the same as mine!! Link to comment https://forums.phpfreaks.com/topic/106375-have-u-the-power-in-php-then-try-to-do-this-little-challenge/#findComment-545289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.