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
0
votes
1answer
28 views

Redirect when not logged and parametr in link

how do I redirect to 'domain.com/sub' for unlogged users, when the url is without the "one_time_login" parameter? This should not work when a user is trying to login via sub.domain.com/wp-...
0
votes
1answer
17 views

Get returned URL from wp_remote_post if response code is 302

I'm sending a POST request to an API: $payload = array('body' => $payload); $payload['redirection'] = false; $response = wp_remote_post( $settings['webhooks'], $payload ); ...
0
votes
0answers
15 views

Template_redirect works, but headers aren't sent when checking via cURL

I'm creating a 307 redirect to maintenance page for when my site goes through maintenance. My PHP class is included in functions.php, and gets instantiated immediately. In my __construct, I call: ...
0
votes
1answer
10 views

How to access my wordpress application using two URLs?

I have deployed a simple self managed Wordpress application on AWS. My setup looks like this. AWS CloudFront -> AWS ALB -> EC2 servers [ wordpress runs] -> RDS Database I have associated a ...
0
votes
0answers
18 views

How to keep WP-Admin at Naked Domain And HTML Output at www

In order to use full-page CDN caching I need to keep my wp-admin at naked domain (theidioms.com) while I want to deliver HTML output at a different url (www.theidioms.com) through CDN Edge network. ...
0
votes
1answer
34 views

Redirect Pending Review Status Preview page url to custom url

Since I am facing a issue with your wordpress that if my authors publish a page in my website then it goes to Pending Review Status. This is working fine. But the preview url of each post that is in ...
0
votes
0answers
15 views

Applying 'middleware' to a url before redirecting? Does WP have built in mechanism for this?

I am trying to implement a notification system in WP, and am trying to do it similarly to how I did it in Laravel, if possible, and if sensible. In Laravel, if I had a notification with a url, when a ...
0
votes
1answer
52 views

template_redirect hooks redirect wrong URL

I made custom plugin about login, register, and forgot password. And I give my plugin add_action template_redirect hooks to verify email, when user login and then redirect to homepage, and forgot ...
0
votes
0answers
20 views

How can I prevent caching of wp_redirect?

I am working on a multisite install where one specific site needs to have access restricted to only users who are logged in AND have a specific user meta set (key="cr_access", val="Yes&...
0
votes
0answers
18 views

How best to structure multiple CPTs and tax within a 'resources' section

I've worked with redirects before but I'm scratching my head on this and hoping someone can help me out, maybe it's not even possible. I've got a main Resources page here which shows content from ...
1
vote
0answers
37 views

Redirecting amp url to non amp url

My wordpress use custom permalinks url with rules /%postname%.html And Htaccess rules # This file was updated by Duplicator Pro on 2021-11-02 05:53:04. # BEGIN WordPress <IfModule mod_rewrite.c>...
0
votes
1answer
18 views

301 all old pages to new location

I have a blog that used to be located in a directory on my domain mydomain.co.uk/Blog I have now moved the blog to the root mydomain.co.uk How do i 301 all of my old pages to the new ones? I have ...
0
votes
0answers
25 views

Debugging issue with redirection in Wordpress

So I made a post, and on the admin panel when I edit, I am told I can preview the post with: https://www.evil.com/promotions/halloween-mega-sale However, it redirects to: https://www.evil.com/promos ...
0
votes
0answers
9 views

Browsers Forcing Multisite to https

I have 2 wp multistes that I am migrating on to an ISPConfig LAMP server. The first has been migrated error free. The second, is throwing an SSL error that I can't trace.... the site, nor server error ...
0
votes
0answers
20 views

auth_redirect() doesn't send users to the page where they orginally tried to acces

In the site I am building, I'm using "theme my plugin" so I could make my own login, logout, registration pages. For the login form, I used the default wp_login_form input names, and the ...
0
votes
1answer
25 views

How can I redirect some pages to new subdomain? [closed]

I have main domain as https://example.com. I added in cloudflare new subdomain as reviews.example.com. In wordpress I use redirection plugin and change url from https://example.com/some/path/some_post ...
0
votes
0answers
15 views

OK to redirect the root WordPress category slug?

In my new WordPress site, I've started using parent and child categories, so that I've begun to have working links of this sort: https://www.example.com/category/photography/ https://www.example.com/...
1
vote
0answers
14 views

WooCommerce unexpected behavior [closed]

I recently encountered what I thought was curious behavior from WooCommerce Products in that the URL redirected when the incorrect directory was specified. Background The product base permalink is set ...
0
votes
0answers
11 views

Redirect to custom login page if not logged in and redirect to home if logged in user try to login, how?

I'm developing a plugin and I need to redirect to not logged in users to a custom login page on frontend so I wrote: add_action( 'template_redirect', 'redirect_if_not_logged_in' ); function ...
0
votes
1answer
25 views

404 on old link after changing post url

Hello I have a problem where i have 404 on posts after changing url with php using this function wp_update_post( array( 'ID' => $post_id, 'post_name' => $...
0
votes
0answers
20 views

Add base folder to CPT and 301

I am developing a WP install that is using a third party plugin that interprets searching the data in an unusual way. In short, the rebuild has made the URL structure change for taxonomies, from ...
0
votes
0answers
13 views

Is it possible to change redirect template through a shortcode?

I have added a redirect for my plugin in init: add_rewrite_rule( 'city/([a-zA-Z]+)/?$', 'wp-content/plugins/csv-to-html/templates/csvtohtmlpage_core.php?city=$1' ); When I go to <site>/city/...
1
vote
1answer
30 views

Use virtual pages point to one specific page

How should I approach this issue? I want to create one page, but many "virtual pages", e.g. like a productinfo.php. A product has several. In this case you manually create the posts in the ...
0
votes
0answers
26 views

How can i fix my permalinks?

I have a WordPress site using permalinks that has about 350 posts with URLs that are using this general format: https://www.example.com/1087-post-name/ The upper link format is like: /%post_id%-%...
0
votes
2answers
30 views

Front page is being directed to an unknown site

Unless I type the URL of my site as example.com/wp-login.php, with URL typed as example.com, the front page is automatically directed to the following unknown site: https://elementonfor.live/?...
0
votes
0answers
11 views

login form should redirect to register page for in 1st login next time it should redirected to home page

I'm new to WP I need your help in redirect the user only for 1st time logging, in my landing page, 1 created a login form if the user logged for 1st time means it should redirect to register page and ...
1
vote
1answer
23 views

Wordpress category page redirects in .htaccess not working

Wordpress automatically generates category pages, for example: https://planthardware.com/category/microgreens/recommended-equipment/ I want to redirect this to a custom page, for example: https://...
1
vote
0answers
23 views

Check Page requested, and redirect

I am trying to capture what page is being requested, then drop a cookie and (ultimately will forward on), but for now just echoing a result and then exiting. The page I am looking for is called ...
0
votes
0answers
26 views

Wordpress url By country code?

I want to add country code to wordpress url by getting user ip address, which should be implemented dynamically. For example if user is from Australia, all website url will be like below: http://test....
0
votes
1answer
15 views

Redirect Existing Post to CPT

I want to redirect the existing posts (nearly 2000) to a custom post type (say news) without interrupting newly created normal posts say (apps) after that, would that be possible?
0
votes
0answers
11 views

How do redirect user back to previous page when on certain pages?

I want to create a redirect such that when a user logins from example.com/sell/* then redirect the user back to referring page.
0
votes
0answers
23 views

Identify User Language, Redirect to the corresponding page and Save the chosen language as Cookie

My site has language versions, autogenerated by GTranslate.io. e.g.: www.site.com/en/ www.site.com/fr/ www.site.com/es/ www.site.com/de/ ... I'm looking for a way to identify a visitors browser ...
0
votes
1answer
19 views

Deleted Image giving a 301

I have images that were deleted from the site (the page and the media library) but are still being requested which can be seen in the network tab. They are redirected and take a huge amount of time ...
1
vote
1answer
98 views

set up 301 redirect within wp-content/uploads/ directory of a WP site to a new image URL

I need to do a redirect within wp-content/uploads/ - to a new image name, because the old one doesn't work. How do you do this? I want to redirect from https://example.com/wp-content/uploads/2021/09/...
1
vote
1answer
20 views

add_rewrite_rule fro html to another url not working

I want to redirect mywebsite.com/anyname.html to mywebsite.com/product/anyname For that I write the following query in functions.php . But it is not working . Please see my code below function ...
0
votes
0answers
13 views

How to access wp-admin from original website after setting the domain redirect/forwarding

Is there a way to access wp-admin from the original website after setting the domain redirect or forwarding? Hope this makes sense.
0
votes
0answers
21 views

The / location 301-redirects to itself in a loop

Lets say my Wordpress site is https://example.com, and when I visit it, I keep getting 301 redirected to https://example.com. This happens only with /, all other pages are working. I have tried to ...
0
votes
2answers
27 views

Relink Drupal Permalinks "...node/XXXX" to wordpress Permalinks (e.g./audio/<name-of-the-post>)

I have a huge problem! I am in the middle of migrating a drupal based online database to wordpress. In the old database every object (post) had downloadable qr code. Because the database is used for ...
1
vote
1answer
32 views

Redirect parent taxonomy to it's child

I am trying to redirect this url/investments/state/city/ to this url/investments/city/ custom post investments taxonomy structure: state 1 city 1 city 2 and so on. Any elegant solution?
0
votes
2answers
31 views

Rewrite Rule working different than expected

We have our blog posts on a custom page with a custom pagination. For example a blog post name is url.de/postname instead of url.de/blog/postname. Therefore we have a page /blog/ which has the ...
0
votes
0answers
18 views

www redirects to another directory in wordpress

I am using Really Simple SSL plugin but I just noticed that whenever I type the www.ozaro.com/mozaro it automatically redirects to ozaro.com not ozaro.com/mozaro So please help
0
votes
0answers
21 views

Redirect users with "." (dot) in their username and replace with "-" (dash) to correct profile

Im having problem with usernames that have '.' (dot) in their username and throwing 404 when try to access their profile page in front end. Can we replace this '.' (dot) with '-' (dash) because ...
2
votes
1answer
28 views

How to create a 301 redirect that doesn't apply to subsites

Scenario: I'm trying to set a 301 redirect so that https://foo.org/events is redirected to a non-WordPress site https://bar.org/events. On my .htaccess file, I set the following: Redirect 301 /events ...
0
votes
0answers
31 views

Open wordpress page in directory the way index.html would open

I have a directory /mydir. If I put an index.html in there, it will open when someone browses to example.com/mydir, and their browser shows only the path, not index.html. How can I get the same ...
1
vote
1answer
17 views

Why do my categories redirect?

When I create a new category I can't open it on my website and instead it redirects to another one called 'Macedonia' E.g. I made a new category called food but when I open the link http://...
1
vote
0answers
18 views

How can I redirect a URL to an anchor link while maintaining the URL?

I am building a one-page website which has multiple sections which I have implemented using a custom theme to display all my pages in one single homepage. I would like the user to be able to navigate ...
2
votes
1answer
12 views

Menu links only using http after enabling https, unable to redirect http links

I have a WordPress website on a Bluehost shared hosting server and since I have multiple websites in my space, I have this particular folder in its own folder under public_html. This means that I have ...
1
vote
0answers
14 views

How do I display only the parent page in the url

My site is going to serve content that I want to keep hidden. It is set up like the example below. site.com/parentPage1/ChildPage1 site.com/parentPage1/ChildPage2 site.com/parentPage1/ChildPageN site....
1
vote
3answers
185 views

Wordpress (behind HAProxy and Jetty), not multisite, in sub folder - and /en/wp-admin/ keeps redirecting to /wp-admin/

I am using an unusual setup to host 3 Wordpress installations on CentOS 8 Linux. In front I have HAProxy (to offload TLS), then I have Jetty configured for FastCGI and php-fpm and finally Wordpress. I ...
0
votes
0answers
11 views

My direct link is redirecting somewhere completely different

I'm trying to directly link to a category. I have 3 images and I'm manually adding a link to each category. https://jjairsystems.co.uk/about-us/vacancies/sales/ This works well. But the two other ...

1
2 3 4 5
37