I include something like, [INSERTFILE=simple-social-buttons], into header with {CURRENTURL} as the data URL, it will be great if the output of {CURRENTURL} is mod_rewrite URL.
now i have to use several if else condition to get the nice mod_rewrite url for different pages, but still missing some other pages.
Comments on Can {CURRENTURL} return SE friendly URL?
Forum Regular
Usergroup: Customer
Joined: May 14, 2006
Total Topics: 41
Total Comments: 103
Posted Sep 14, 2012 - 9:07 AM:
I see that now {CURRENTURL} variable on pages, such as on view-category pages, returns something like
......../index.php?rewritten=1&action=displaycat&catname=cat-name/
and I see the header always outputs something great like.
<link rel="canonical" href="....../nice-mod-rewrite-url.html" />
Can the global Variable, {CURRENTURL} return the actual mod_rewrite URL same as canonical tag?
I want to use the variable for FB likes, twitter and google plus.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
If the likes are of listing details pages, use {LINKDETAILSURL}.
Forum Regular
Usergroup: Customer
Joined: May 14, 2006
Total Topics: 41
Total Comments: 103
I include something like, [INSERTFILE=simple-social-buttons], into header with {CURRENTURL} as the data URL, it will be great if the output of {CURRENTURL} is mod_rewrite URL.
now i have to use several if else condition to get the nice mod_rewrite url for different pages, but still missing some other pages.
<IF {TID} contains main.tpl>
...
<ELSE>
<IF {TID} contains displaylinks.tpl>
....
<ELSE>
<IF {TID} contains details.tpl>
.....
<ELSE>
......
</IF>
</IF>
</IF>
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
My research suggests that <?php echo $_SERVER['REQUEST_URI']; ?> may or may not get you the rewritten URL, depending on the server configuration.