• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 488
  • Last Modified:

How to get the full http address and querystring from WordPress?

I am trying to get the full http address including any querystrings, from a wordpress page (I am building a WP theme).

None of the $_REQUEST attempts I try work.

Here is the page I am working on: http://www.the1stdistrict.com/blog/final-election-results

Is there a way for me to query WP to get the full address listed above?
  • 2
1 Solution
Ess KayEntrapenuerCommented:
echo $url;

Ess KayEntrapenuerCommented:
When you run $_SERVER['HTTP_HOST']; you'll get result "www.apple.com" only, no "http://" no "/downloads/dashboard/email_messaging/todo.html"

When you run the script "$_SERVER['REQUEST_URI']" you'll get the result below.
no "http://" and no "www.apple.com


hope that helps
rascalAuthor Commented:
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.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now