0

I want browser URL which is in address bar and the URL which is shown in left side after hover link should be same

for example in browser my URL is look like this http://localhost/test2/article.php/product-1

and at left side the URL is look like this http://localhost/test2/article.php?pname=product-1

i want left side URL same as browser URL .

riya
  • 116
  • 15

2 Answers2

1

You can maby do it with .htaccess file

RewriteEngine On

RewriteRule ^article.php/([a-zA-Z0-9_-]+) article.php?pname=$i

Or something similar. Not sure what you are looking for

Example html

<a href="aricle.php/product-1">Article</a>
Tonza
  • 650
  • 8
  • 17
0

Print this as your left side URL:

 echo 'http://'. $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];

You may want to use this as a reference: How to print current URL path?

Community
  • 1
  • 1
Indrasis Datta
  • 8,692
  • 2
  • 14
  • 32