softsoft
Member
Posted 4 years ago #
how to display urls after my site url http://www.mysite.com
say post link is http://www.mysite.com/i-love-wordpress.html
i want to display i-love-wordpress.html only.
i used <?php echo $_SERVER["REQUEST_URI"]?> but it is not working.
can some one help me please.
softsoft
Member
Posted 4 years ago #
What are you talking about? Creating a link.
<a href="http://www.mysite.com/i-love-wordpress.html">i-love-wordpress.html</a> Will show up like this. i-love-wordpress.html
softsoft
Member
Posted 4 years ago #
<?php echo $_SERVER["REQUEST_URI"] ?>
this code should display posts ,categories and tags links without http://www.mysite.com to be like:
/my-post.html
/category
/tag
but it is not working.
taffeljohan
Member
Posted 4 years ago #
<?php echo parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); ?>
softsoft
Member
Posted 4 years ago #
Thanks taffeljohan,
it is working fine.