Questions tagged [redirect]

"HTTP Redirection" – the process by which a request for one URL is automatically replaced by a request for a different, usually related, URL.

Filter by
Sorted by
Tagged with
2
votes
2answers
11k views

Wordpress subdomain wp-admin redirects to main domain

we have a wordpress installation running on address www.example.com. We wanted to have a development site for it as a subdomain, so we created a subdomain dev.example.com on cpanel. Created a ...
2
votes
1answer
3k views

Redirect to post with only post ID in the URL vs post_type/post ID

The title may be a little confusing, I don't know how to word it to be short. Right now my permalink structure is /%post_id%/%postname% so the final URL is /post_type/%post_id%/%postname%. When I go ...
2
votes
3answers
14k views

Redirect user after logout

I am trying to create an unsubscribe page for my members, but in order to see the unsubscribe form, they have to be logged out, so the first link is: /wp-login.php?action=logout&_wpnonce=...
2
votes
3answers
6k views

how to do logout redirect to current url

I'm using custom menu for login/logout here below is my code: <?php if(is_user_logged_in()) { $user = wp_get_current_user(); echo 'Welcome <strong><a href="http://...
2
votes
3answers
8k views

Rewrite-Rules not working on a vhost, everything goes to index.php

after setting up the wordpress htaccess rules in my vhost, i was unable to enter the wp-admin area. I was always redirected to the frontpage of my wordpress instance. The rewriting itself worked on ...
2
votes
1answer
1k views

Wordpress removes spaces in URL on pagination

I'm having a problem with wordpress rewriting my URLs, basically I have a regular search form with method set as GET, when I submit it the URL looks like this at first: http://mysite.com/news/?type=...
2
votes
2answers
2k views

wordpress custom login successful redirect hook

I am using a custom login form imported on my theme's home page through jqModal. In that, when i successfully login it redirects to the same page. I want to redirect based on the logged in user role. ...
2
votes
2answers
3k views

Phantom 302 status code when sending a POST requests on pages

I really hope I've got a simple issue in front of me here, as it's sort of driving me up a wall. Short story: submitting a simple form on the front end of the site results in a 302 Found redirect, ...
2
votes
2answers
11k views

Domain redirect in Wordpress multisite

I have two domains www.domain1.com and www.domain2.com, both pointing to the same host. What I want to do is redirect www.domain2.com to www.domain1.com/domain2. I got this code for a .htaccess from ...
2
votes
2answers
682 views

Using WP rather than .htaccess to redirect pages/posts

I run a site with over 100 specific redirects in the htaccess for legacy html files that were subsequently brought into WP. There are also rules for pages within a date range to redirect to the home ...
2
votes
1answer
46 views

What is the wordpress way of displaying local external content?

I have a somewhat tricky situation. A company's internal server, running some unknown software (means I have no access whatsoever), exports data to my http server via a custom API. This data gets ...
2
votes
1answer
4k views

Can't access admin dashboard with wp-admin without /index.php after it

After I log in, I'm redirected to example.com/wp-admin/, which has a "ERR_TOO_MANY_REDIRECTS" message. If I type in example.com/wp-admin/index.php, everything works just fine. My wp-config.php looks ...
2
votes
3answers
8k views

How do I redirect all 404 errors of a specific post type to another URL?

I have a custom post type containing job listings, that is highly volatile. Jobs are frequently added and removed. Our analytics show that a lot of crawling errors are for detail pages of jobs that ...
2
votes
3answers
8k views

WordPress template_include filter not working properly

I am working on a plugin. The plugin make custom post type "product". First i use template_redirect action for redirection to single and category pages. Here is my template_redirect code: add_action(...
2
votes
1answer
2k views

How to redirect custom post type archive to first term of associated taxonomy?

I have a custom post type 'countries' and a taxonomy 'cities'. My cities are: boston, new york... I want my archive-countries.php redirect to the first term taxonomy. I mean, if my URL is www....
2
votes
1answer
941 views

WWW to non WWW redirect effects on load speed

I was using pingdom to test the load speed on a site I'm working on and got different results for www vs non www. Wordpress automatically redirects to either www or non www depending on the settings. ...
2
votes
1answer
1k views

redirect pages with no content, instead of 404 error, using max_num_posts?

I have a site that has changed its pagination structure, resulting in a huge amount of 404 errors (more posts are being shown per page than previously, so there are lots of pages that were once ...
2
votes
1answer
3k views

How To Only Allow Users To View Their Own Buddypress Profiles? [closed]

I am currently developing a social-network sort of site using Wordpress + Buddypress and the client has asked that profile pages not be publicly visible for the time being. Basically the client is ...
2
votes
2answers
3k views

Check if post is in draft or pending review?

Each of our posts are reviews for individual games and we occasionally have to 'pause' the game by changing it from published to pending review. The problem is if the page is indexed by search engines,...
2
votes
2answers
9k views

Wordpress Redirect based on the prescence of a cookie

I have a tricky situation.... I'd like to check for a cookie. If it doesn't exist then then redirect to an internal wordpress page, and set a cookie. And then carry on browsing the site. But i get ...
2
votes
4answers
2k views

Can Wordpress redirect to a “similar page” in case of 404 error

This stuff is driving me nuts. The following url does NOT exist and should return a 404: http://www.easyjob.net/resume/ However, if I try to access it, I get a 301 to http://www.easyjob.net/r/cover-...
2
votes
1answer
630 views

Does WordPress send a 301 header message when you change permalink structures?

I have a super old blog that I upgraded from 2.0.7 to 3.1 by upgrading over multiple versions. One of my biggest concerns was losing all the link juice from my legacy URLs but they were clearly made ...
2
votes
5answers
11k views

Multisite non-www domain redirects to sign-up

I have Multisite enabled and can only view my site with the www. When I try without the www it sends me to the sign-up page and says Registration has been disabled. www.domain.com/portfolio <--...
2
votes
1answer
210 views

htaccess redirect dynamic posts

Probably not the correct fora to ask, but.. Also probably a simple question.. We are changing our site to Wordpress, and need to redirect old posts. Previously structure: http://url.com/art/12345....
2
votes
2answers
81 views

Hacked website redirect, only on desktop, help with restoring it [closed]

This is my first post, I tried searching for similar problems, didn't find any that would fit my situation. Anyway. Recently my cousins website got hacked, I decided to take a look and try to fix it ...
2
votes
1answer
3k views

Disabling the X-Redirect-By response header

Is there a clean way to not have WordPress send the X-Redirect-By response header when redirects happen? I'd like to disable it in order not to expose information about our software stack. Something I ...
2
votes
1answer
3k views

Password Protected Page Not Displaying Content After Entering Password

For reason unbeknownst to me (I'm not the original developer). This custom WordPress site doesn't show the password protected login form..."This content is password protected! To view it please enter ...
2
votes
1answer
1k views

WooCommerce lost password reset flow not working with SendGrid (redirect loop)

Leaving this here for anyone who runs into the same issue because I just spent a few hours to track this down and couldn't Google my way there: The WooCommerce reset password flow is broken. The ...
2
votes
1answer
409 views

RedirectMatch and Redirect interfering with each other

I have the following lines in my .htaccess (there are other lines but these two are next to each other) RedirectMatch 301 ^/datingstories https://example.com/blog/category/relationships/...
2
votes
1answer
466 views

Redirect User to Homepage if no other redirect is specified

Basically I want to write some code that decided wether to redirect a User to the Home page of the website or to the page that the user came from prior to logging in. I have this code which ...
2
votes
2answers
4k views

Wp Login redirect strips parameters from url

If i write http://domain.com/wp-login.php?redirect_to=http://domain.com/specificpage/?parameter1=dog&parameter2=dog&parameter3=cat in the url address bar (to make the login page redirect to a ...
2
votes
2answers
12k views

Mixed Content with SSL, wordpress behind a reverse proxy

I ran into mixed content with SSL issues. I've applied for Let's encrypt SSL certificate for my test wordpress site behind a reverse proxy(articaproxy). The same SSL certificate has been deployed in ...
2
votes
2answers
441 views

.htaccess - Redirect duplicated post ended in '-number/' to the same url without the -number/

I have many duplicated post and I wanted remove them but Google already indexed them. So the idea is redirect all post with pattern [-number] in the end of the url to the same URL without number www....
2
votes
1answer
180 views

Custom rewrite rule

I need to do some URL Rewriting, but that is all new to me and I've tried a few things but nothing seems to work. For example: I have an URL that looks like this. http://example.com/directorio/?...
2
votes
1answer
1k views

Top level Pages redirecting to homepage!

For some reason after setting the permalink to any other structure apart from default. The top level pages will start redirecting to the home page. I have disabled all the plugins and change theme to ...
2
votes
3answers
885 views

Redirect before post page

I have post list page of a category. I want to redirect not logged user to login page before he views the post page. I tried with wp-members plugin, but not. In wp-members plugin, there is a hook to ...
2
votes
1answer
69 views

How to hide that a certain non-Wordpress directory exists on the server?

I'm very much a newcomer to Wordpress and to this site, so I apologize if this is easy or addressed elsewhere. I have a WP 4.0 site, using a naked domain http://example.com, with the WP installation ...
2
votes
2answers
8k views

How does Wordpress redirect to WooCommerce shop page? [closed]

I'm creating a plugin for WooCommerce, it needs a parameter in the url of shop page like this http://domain/wp/shop/?param=value. It worked fine until I set the shop page as front page, when I access ...
2
votes
1answer
5k views

Logout and redirect using the WP Menu

I have a navigation hyperlink in my secondary menu, that will allow the user to logout: However, the user is prompted with the following screen for confirmation, when clicking on the hyperlink in ...
2
votes
3answers
223 views

base directories / URL

Is there a way to handle base directories for taxonomies that result in a 404. For example my URLs are: http://skipology.com/category/... http://skipology.com/app/... but the taxonomies / base ...
2
votes
1answer
13k views

All pages showing up as homepage on Wordpress website

Why would this be happening? Every link I click on on my site results in the homepage again. You can check it out here: http://www.whatamidoingonline.com What is going on here? This just started all ...
2
votes
1answer
312 views

404 to 301 - Fixing old links

I have currently updated a site and made many improvements to it. The old site ran off 3 different systems and had wordpress (and the other systems) in the webroot. I have moved wordpress into a ...
2
votes
2answers
2k views

Plugin for conditional redirect

Lets say, I create page1 and page2 in wordpress, in Page1 there is a hyperlink which takes me to page2. How do I ensure that visitor has clicked that hyperlink and have come to page2 and not directly ...
2
votes
1answer
556 views

Redirect one of two domains on one Wordpress installation

I have to domains: mydomain.dk and mydomain.de. Both are showing the same page in danish. I have a plugin that takes care of the languages, but I need to connect the .de domain to the german 'language ...
2
votes
2answers
2k views

Query WP data with the WPDB API from outside WordPress

I'm working on a project with WP, a bit like a plugin, but not quite one. I'm encountering an issue, when trying to include a file that contains some custom SQL functions in a class, in a completely ...
2
votes
1answer
1k views

Redirect category to first available child post

Is possible to redirect category to first available child post please? Thanks!
2
votes
2answers
305 views

Get the final destination after WP_Http redirects (WordPress)

I'm doing some requests to an API via WordPress, and the API uses SSL connections if they're turned on in the API settings. I'd like to determine whether SSL is turned on or off without having to ask ...
2
votes
3answers
12k views

Wordpress redirection problem after moving to a new server?

I've created a site using wordpress and i moved that from localhost to new server. The steps i've followed is just got backup of old db from localhost and uploaded them to the new server. Changed the ...
2
votes
2answers
1k views

How to let a single post have its own domain name

I am not sure which solution here would work best as a solution but what I am looking for is just a simple way to enter an optional domain through a metabox on the page edit screen and then just ...
2
votes
1answer
52 views

Changed permalink structure. Need help with redirecting old posts

I just changed the urls structure of my site and want old urls to be forward to the new without the use of redirection plugin. Old structure: /%category%/%year%/%day%/%postname%/ New: /%postname%/ ...

1
3 4
5
6 7
36