You should get ID of the page you’re looking for:
$page = get_page_by_title('thank-you');
wp_redirect(get_permalink($page->ID));
exit;
It looks like you want to get page by slug. If that’s the case, you should use this function instead.
Also, for Location header don’t use space after “Location” string:
header("Location: http://localhost/mysite/faq");
Related Posts:
- Check IF is a “single product page” and Check the “role” for a Redirect
- Where does the 404 redirection happen?
- How to change redirect after moving a page to trash?
- Password Protected Page Not Displaying Content After Entering Password
- Redirect “Sorry, you are not allowed to access this page.” to Home
- How to redirect a page to subdomain?
- Slug is redirecting to 404
- If a page does not exist, include a different page?
- How to redirect a page to another?
- Page redirects to archive
- Unique page URL redirect to file_get_contents() at domain
- Change base URL of pages created by certain users
- Redirect page to default subpage
- Page access only from a specific page in wordpress website
- logout redirect only from admin page
- WordPress page not taking precedence over server directory
- Folder wordpress page redirect
- How to rewrite a page url
- redirect index.html inside folder to wordpress page of same name
- How should I set up a Tumblr blog at a WordPress Page?
- URL redirect to home page issue in word press site
- WordPress redirects to login page when I enter url.com/index.php
- Cannot use old slug – it just 301s to site home page
- How to change the default location where new post gets stored?
- How can I keep the content of my pages version controlled?
- How do I convert a page’s title to lower case?
- page title, parent tilte and grand parent title
- How to add jQuery script to an individual page?
- Multiple areas of dynamic content in a page
- How to create virtual pages with information from user meta profile fields?
- Increment Page Order As Pages Are Created
- Private pages that work when you are not logged into WP admin
- Is there a way to remove or hide individual pages on the Edit Pages screen?
- Add custom admin menu item for pages using a certain template
- Display latest comments on page with pagination
- How to add pages to feed?
- Creating custom page
- How to create a metabox that will list all my pages in a dropdown selector?
- Relative instead of absolute links in pages?
- Produce a plain page with only a message
- load common thank you template with different content for different pages
- Password Protected Page Title
- Load specific page template based on URI
- Page displays content from different query?
- Site url is not showing the home page
- Can’t locate a hidden private page
- Making audio playlist by getting page’s parent’s ID
- 301 (static page instead latest posts)
- Restricting Pages based on Hierarchy and User Role
- Pages Column Sorting WordPress Version 3.0.3
- Adding Page URL to the Pages Admin Table
- More Fields Required For Password protect page
- Add categories and posts to page hierarchy
- How to retrieve attachments from child pages of a specific Page?
- Admin taking a very long time to load
- how to display sidebar on pages in wordpress
- How to capture GET argument on static page
- page.php is not called, falls back to index.php
- I would like my page editor to be sorted by date created, or updated, instead of in Alpha order, is this possible?
- Redirect /home to home.php
- Show FormCraft form on page open [closed]
- Why last blog post excerpt is shown instead of meta description? [closed]
- Prevent non-admin to add/create new pages
- How do you implement a page template automatically being applied to a page?
- Make “default” wordpress pages & features unaccessible
- How to create cutom link for page
- creating single page with 2 columns while theme is 3 column
- Show parent & child pages with featured image and hide the current page
- Outputting content from page
- Use an archive as the parent of a page?
- Publish page by invoking submit via jQuery
- One author not showing in Author drop down list while editing page
- WordPress Page Protect forwards to Admin Login
- How can I edit pages from my local environment?
- Modifying .page-content background image
- products category page editing
- “Can’t update in WordPress”
- Different template parts when on different pages
- Why can’t pages be categorized / tagged?
- Pages in wp-admin is not found 404
- Shortcode runs when editing page
- List of pages of a specific user
- wordpress page navigation numeric pagination showing same posts on each navigation
- WordPress dosn’t save page/post updates
- Multiple meta_key with get_pages
- Sup pages can’t be found
- WordPress Page All Content In Template Good Or Bad Convention?
- Send e-mail from admin area to adresses in custom field
- Bundle a page with custom url and a function
- Custom Upload Adds Ghost File
- WordPress white screen with “All Pages”
- How to exclude sidebar from pages?
- Widget & storing a Select box choice
- Can’t select a page using is_page()
- If searched in a category show different 404 page
- How can I cycle posts with a #next and #previous script?
- Using Page/Post Slug In Link / URL
- Does WordPress list all pages for crawlers?
- How to display child page from specific parent page in homepage?
- How do I count the number of pages a user has seen on my site, and force them to log in after a certain amount