How can I change all links on pages to point to a different domain from where the site is hosted?

I saw this question: How can I change permalinks to use a different domain and path from where the blog is hosted? and was wondering if someone can help me. We’re hosting a wordpress blog on WP Engine (e.g. blog.wpengine.com) We have a different app hosted on Azure (e.g. at site.com.au) and are using a … Read more

Get current url with parameters passed

How can I get the current url in a wordpress page? I have enabled clean urls, but I want the url without the clean urls. For example http://example.com/?page_id=1 instead of http://example.com/my-page 2 Answers 2 Add the following custom function in functions.php file of your theme to get the page url without the clean urls function … Read more

Redirect main domain to subdirectory

Following the following code sample I managed to redirect it, however the site URL on the browser show as domain.com/subdirectory and not domain.com. public_html ROOT .htaccess RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteCond %{REQUEST_URI} !^/subdirectory/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /subdirectory/$1 RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteRule ^(/)?$ subdirectory/index.html [L] subdirectory .htaccess # BEGIN WordPress … Read more

Concatenate site_url and string doesn’t work

I’m trying to concatenate my site_url and a string, but it doesn’t work. This is what I’m doing: $myurl = site_url(); var_dump($myurl); $url = “https” . $myurl . “/inbox/?fepaction=viewmessage&fep_id=” . $inserted_message->ID; var_dump($url); die; The output looks like this: string(31) “//zgp.mydomain.be” string(78) “https:/inbox/?fepaction=viewmessage&fep_id=4813” As you can see it isn’t merged. How can this be? 3 Answers … Read more