Jump to content

have u the power in php , then try to do this.... little challenge


agha.faisal

Recommended Posts

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

 

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.