302 Redirect without Redirecting to Page (HTML) - html

I have an old website on Weebly that I would like to redirect (302) to my new WordPress site, Endelve Design. As far as I know, the only way I can perform a 302 redirect with Weebly is by adding code to the header pages, so I am limited to using HTML and JavaScript. However, I would like to redirect pages like so:
http://ericburnett.net -> http://endelvedesign.com
http://ericburnett.net/blog.html -> http://endelvedesign.com
Essentially, I would like to redirect all pages in my old site to the home page of my new site. I do not want it to do this:
http://ericburnett.net/blog.html -> http://endelvedesign.com/blog.html
I find that if I use any of the following methods, it produces the undesired results seen above.
<meta http-equiv="refresh" content="0; url=http://endelvedesign.com" />
<script type="text/javascript"> window.location="http://endelvedesign.com"; </script>
Thanks!

Sorry for the delayed response. This question is not for this board, because it's more administration, than programing. First of all you need to know your way around the .htaccess file. In your case it's more than enough to know this line:
RedirectMatch 301 ^/.*$ http://endelvedesign.com/
It redirects all hits from your old site to your new site with code 301 (Permanent redirect).
The second part of your problem is accessing the file itself. I never used weebly, but after googling around for a while I found many solutions, ranging from praying to the moon gods while sacrificing sea water, to actually solving your problem by hand. There are 2 way which caught my eye.
The first one is via the SEO panel. In order to avoid the wall of text answer, i suggest you look for exact instructions here. If you are lazy to look at the link and/or good at managing on your own it in Setting->SEO->301 redirects. Judging by the tutorials it has some limitations.
The second method is to export/import your site. Basically you export your site, add the code above to the .htaccess file and you import the site back.
A friendly reminder: I never used weebly, so those resolutions are based on what I found on the subject, as in I never tested them.

You can just add a bit of javascript in the body.
<script>
window.location = "http://www.newurl.com";
</script>
This way you can redirect, but not set a 301 or 302 header.

Related

Add html to a site in a site (proxy)

I imported a web proxy from github known as rhodium on to replit, and, after some editing was satisfied with the results, but i cant seem to add HTML to a site that is proxied. Example: You use rhodium to navigate your way to www.discord.com, but you want HTML added to the page, "yourdomain.example/service/https://discord.com/". I looked at the files and online, but I wasn't able to find a way to edit the index.html of that specific page, but frankly I am extremely new to html. (and to a lot of things web-development).
https://github.com/LudicrousDevelopment/Rhodium
Any help available?
Based on what i know, you can't. Because of the security parameters. You can't attach or redirect a website which isn't on the same directory/server.
You can, however redirect to that site, inside or outside, freely.

Redirecting unless client has come from paypal

I'm trying to have the HTML code check where a client came from so they can only access this page through a link and we will say this link is from Paypal after purchase and if they don't go through Paypal they will be redirected to the home page of my website, in this case, is home.com (not really).
My Code:
if(!isset($_SERVER['HTTP_REFERER'])){
<meta http-equiv="Refresh" content="0; url='https://bypassdetected!'" />
header('location:../index.php');
exit;
You would need to check if the contents of HTTP_REFERER includes 'paypal.com', although this is a dumb sort of check since it's easily spoofed and accomplishes little of value
Regarding the action your code then takes, you can't combine HTTP header location redirects with HTML redirects, it's one or the other, but if you do try to send both, the headers have to be set before any body content
Redirecting over to PayPal should be avoided in general. You should switch to a PayPal integration that does not use any redirects at all, such as this one: https://developer.paypal.com/demo/checkout/#/pattern/client -- then, your site always stays loaded in the background, which is a far better modern web experience

How do I fix multiple redirects to my mobile site on Blogger?

One of the numerous suggestions made by Google Page Speed Insights regarding my slow as yuck website is:
Avoid multiple redirects. Redirects introduce additional delays before
the page can be loaded. Learn more. URL Time Spent (Initial:
http://okc-craigslist.blogspot.com/) 0 ms
/?m=1(okc-craigslist.blogspot.com) 630 ms
/?m=1(okc-craigslist.blogspot.com) 180 ms
Can someone tell me what this means exactly? I don't know why I would be redirecting twice to the mobile version of my website. How do I fix this?
Help!
If you mouse over the two links in the PageSpeed output, you can see that the first starts with http://, and the second https://. The first redirect changes the query string, and the second the scheme.
Ideally the first redirect would send you to both HTTPS and mobile version of the site, but that might not be possible for you to control.
Perhaps Blogger can turn on HSTS? That will teach the user's browser to apply the http→https redirect to the entire site.
To Avoid multiple page redirection for Following Steps :
Go to "Edit HTML" of your blog/blogger.com or website.
Add below code just after tag of your blog:
<script type='text/javascript'>//<![CDATA[
var curl = window.location.href;if (curl.indexOf('m=1') != -1) {curl = curl.replace('m=1', 'm=0');window.location.href = curl;}
//]]></script>
and Save it .
it will works fine
here is Demo website that it works fine on blogger

Redirecting Posts on Tumblr to Custom Pages

Now before you post one of the many "Add a Page" tutorials I've read, I'm going to say that none of those have helped because not only has Tumblr removed the "Redirect" option on it (courtesy of April 8th, 2015, unfortunately), but the add a page feature does not seem to work when using a custom HTML code--even when you use the "add a page" link that you created and paste it into the link url section provided for the tabs!
Of course, I have also looked at questions on here, but those pertain to loops leading back to the Home page, and do not specify how to have your posts redirected to a specific page. Believe me, I have tried the whole /tagged/yourname URLS under the URL section for the Link, but that is ineffective. I have even tried giving the post a Custom URL and then pasting that URL into the designated link URL section to see if it would pop up under the page but alas, that did not work either. And yes, I've even scoured through the code to find a possible paste solution and have pasted the link into the code directly, but that didn't change anything either as it was just under the "naming" section in the beginning of the code, anyways (should've known that wouldn't work).
If anyone can help me with this issue, or at least understand what I'm even asking, I would be forever grateful.
EFFORT FURTHER EXPLAINED:
Note: the tumblr's /submit URL works, but my attempts on, for eg, a separate art page for posts tagged "somethingart" have been fails.
Redirect: Here's an example of one of the many tutorials I read that has a clear image of where the "redirect" option should be, but of course it's outdated as the edit appearance looks slightly different from that now (you have to scroll down a little).
Okay, so let's move on to the other attempts now although, unfortunately, you're going to have to view them on a google document because apparently, you need to have 10+ reputation to post more than two links (click the link above)!
As for the coding part, well I'm actually a beginner at coding as I've only had two classes last semester (which was a while ago), and that was in C# and the foundations of computer science, so scouring through this code to try and find where I could add something to make it work only gave me a headache in the end (it's really long...).
I think I get you now. As a new account some features are not yet available to you. You will get those features eventually. For now (from what you have in the pictures):
The link (link6 URL) went to home page (or to the error page) most probably because you did not have http:// in the beginning. I said that by assuming how your theme is made based on the picture of 'Theme Options'.
After that is solved, you know the page would not redirect itself to your "tagged/something" page because it is not a "Redirect" page, and you do not have any script to do the redirection (if you do not actually).
Do not worry though, there is a better way; just have the "tagged/something" link directly in your "Link6 URL" option (as in the pictures). You have to put it something like; http://yourblog.tumblr.com/tagged/something.
Let me know if you have any questions?

How to add a redirect to a web page where you have limited user priveledges

The company I work for has replaced our previously very flexible website with a much more restrictive "website in a box" technology. I have my web pages hosted on Google Sites and would like to redirect people to those pages. When I attempt to do this via javascript it gets stripped from the page when its saved. I do not have access to the section to attempt the depreciated method of redirecting.
Is there another method available to automatically redirect a customer other than just posting a link in a restricted environment like this?
If you're limited to using HTML to do the redirect, you can use a meta redirect:
<meta http-equiv="refresh" content="0; url=http://example.com/">
Though note that its use is deprecated because it may be disorienting to the user. In addition to the <meta> tag, you can add <link rel="canonical" href="http://example.com/"> to let search engines know that the targeted page is the canonical one.
Edit: if Google Sites won't allow you to change the <head> HTML, the Javascript, or the PHP, then it's time to go searching for solutions within Google Sites itself. One solution that pops up pretty frequently in searches seems to be using a URL Redirect Gadget.
On the page you want to redirect from, click the Edit Page button, then Insert Menu, then More Gadgets. Once there, search for "redirect gadgets" and some widgets that should help will show up.
These instructions are based on advice given in the Google Products forums. I don't have a Google Site myself, so I can't verify that they work.