简体   繁体   中英

How to echo real url without htacces rewrite

I have some url's that are rewritten by the htacces file. I want to echo the real urls.

Is this possible?

Any help would be appreciated.

If you are removing the extension of the file with .htaccess file you should probobly take the real url

$fullURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

And then use the str_replace function to replace the file extension

str_replace(".php","",$fullURL);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM