How to use variable absolute hyperlinks in wordpress post?

How to use variable absolute hyperlinks in wordpress post?

if it is links within my post it is definitely possible to user variable absolute hyperlinks?


What should I write inside for variable absolute hyperlinks?


Who is Participating?
singletonConnect With a Mentor Commented:
If the directory structure does not change, you can use relative addressing. I.E. a file http://localhost/abcserver/index.html can refer to http://localhost/abcserver/123.html by just saying 123.html, and it can reference http://localhost/abcserver/folder1/123.html by just saying folder1/123.html, but you need to make sure you dont change the directory structure when moving it, and you definitely do not want to use a full permalink, which would be http://localhost/abcserver/123.html, because once you moved it to, that permalink would not work. You might be able to remap it with the ".htaccess" file; one can do a lot with that file, and I have just done a little with it, but your safest way is to make sure any internal references are relative, which means you cannot change the directory structure when you move it
What is a "variable absolute hyperlink"

Variable and absolute seem to be mutually exclusive
shortandsharpAuthor Commented:
suppose your production server is

a page is

if that is to be deploy on my local server

whose document root is f:wwwroot

then absolute url on local server will be


which is to said,  how to make localhost/adc/ the same as

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

That is a very good question, and it is the point I was making in

It may be possible to do it with .htaccess, but I have never tried it
shortandsharpAuthor Commented:
pardon me I'm not a native English speaker.

What I mean is if I made a post

inside the post how to I make my hyperlinks within my url absolute hyper link independent of where the blog is?

if it is on blog

if it is on localserver



stubooConnect With a Mentor Commented:
It's a really dirty way to do it, but you could probably use the RunPHP plugin

and then use wordpress tags for the beginning of the url so that

<?php bloginfo('description'); ?>/abcfolder/index.php

could all be the same, link no matter where you upload the site.

Hope this helps,
can we use like this?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.