Only load page when arriving from a URL - WordPRess - wordpress

How can I set a page (https://website.com/secret-page) to only be accessed or loaded when a visitor comes from a specific page or URL.
Example: Visitor loads /secret-page but did not arrive from /go-to-secret and therefore can't access the page and gets redirected to the /redirect page.
I was thinking of using .htaccess to achieve this but I have no idea what the code would be.
The website is built using WordPress and Elementor. Hopefully, someone can assist.

Related

Problem with Page has redirected JavaScript

I did an audit of my website and it sends me this message
"Page has redirected JavaScript"
Issue details
Some pages on your website link to JavaScript files via a redirect.
This forces web browsers and search engine crawlers to make an additional HTTP request in order to reach the destination JS file URL. On a vast scale, this can increase page loading times for your website.
How to fix
Review the pages that have a link to the redirecting URL and replace this link with the direct link to the destination JS file.
If you decide to keep links to redirecting URLs that do not belong to your website, make sure that the destination files are relevant.
And I get several links like these:
https://script.crazyegg.com/pages/scripts/0012/9265.js
https://s7.addthis.com/ with randoms numbers
Has anyone had a similar problem who can help me to see how to solve the problem?
It sounds like you have some pages that are actually loading a remote JS file, which then redirect to another page on your website.
Why this is happening is anyone's guess - maybe you have a plugin installed that is doing it intentionally as part of it's functionality. I would start by disabling plugins one at a time (ideally on a staging environment) until the problem goes away, and then you'll know who the culprit is and make a decision.

The Redirection plugin for Wordpress isn't working

I want to redirect all the links in my old wordpress.com to my new .com site, but I keep getting a fail message from Redirection.
I've attached two screenshots to show how I'm trying to create the Redirect and then the fail message. Rather, the photos are showing up as embed links. I've cleared my cache, so I know that's not the issue.

How to redirect (or bring back) /services/ pages after migrating from Wordpress to Shopify?

My problem is that my client has migrated from Wordpress to Shopify, and there were some important pages on the site under the /services/ folder. I wanted to redirect them to their new pages after the migration, which are /pages/ pages.
Shopify has reserved /services/ URLs, however. Therefore I cannot redirect mydomain.com/services/some-services-page to mydomain.com/pages/some-services-page.
Additionally, I cannot change the URLs of the /pages/ pages to /services/ pages.
What would be the next best step here? It seems like a significant limitation of Shopify, as any pages you want to migrate from another CMS that have /services/, apparently can't be redirected, and you lose the SEO value. Those pages are now returning 404 and there doesn't seem to be anything I can do about it, or am I missing something?
I've had some back and forth with Shopify support, which ultimately ends with them saying its a limitation of Shopify and I should submit a feature request. I appreciate any advice you might have.
You can manually create redirects from old relative urls to new ones on shopify by going to [yourstore].myshopify.com/admin/redirects
If you want to track which pages customers are exactly hitting and getting 404's, you can use app Transportr:
https://apps.shopify.com/transportr
It tracks which pages are getting 404, and you can also create redirects directly from an app

Changing landing page of website hosted on sharepoint

I have a collection of sites hosted on sharepoint and I'm trying to change the welcome page from pages/default.aspx to one of the site's pages/default.aspx. When I try to do that normally, I get an error saying:-
The specified welcome page is not valid or does not exist within the current site.
I read up on it and found that this can be resolved by copying the default.aspx page from that site's pages to main pages folder. However, I get an error:-
You may re-try the operation, and you may need to clean up the half-created data first before re-trying.
I cannot find the place where publishing can be enabled which has been suggested as a resolution to this error.
Can someone help me and tell me how I can resolve this issue?
a sub site page cannot be converted into a landing page directly. The workaround that I used was to create a redirect page in the main site and make it the landing page. The users can then be redirected to the subsite page once they land on the redirection page.

WordPress front page (homepage) fails to redirect when static front page is set

I have configured WordPress to display a static front page as described here:
http://codex.wordpress.org/Settings_Reading_SubPanel#Reading_Settings
When I save changes and try to visit my front page, my browser displays the following error:
"The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
(source: flickr.com)
Changing cookies settings does not remedy the situation.
I'm using the theme Constructor (http://wordpress.org/extend/themes/constructor), which I suspect may be contributing to the problem.
How can I make WordPress properly display my front page?
create a page called home or whatever, go to
**Admin->Settings->Reading**
Change the......
Front page displays
1. Your latest posts
2. A Static Page
Select Static Page and from the dropdown select your newley created home/page.
if its not redirecting check your permalink settings...set it to default.
Check the homepage is working, re-apply any permalink settings you had..
If the page is still redirecting in a away it will never complete, then try opening your .htaccess file in the root of your wordpress site, delete anything inside and save it,
Again check your homepage... if its still not working, then it's def; down to your theme you are using, if there are particular theme templates for the homepage then that may be the cause.. no time to check the template myself just now, (maybe later)..
You could check the
admin->edit-page
you should see all your loaded pages on the site,
hover over the homepage listing and click "Quick Edit" onm the right hand side, have a look and check the template drop down menu for any homepage specific template that needs applied to that particular page, then click update and re-check the homepage status now.
"The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
this problem happening when you redirect to a page who redirect you back. and it create indefinite loop of redirecting. So, the browser will trap and confuse and produce such error. Read you code again
maybe you need contact the theme author

Resources