Webpage with ampersand in its name suddenly stopped loading ("bad request") - html

My boss has tasked me with remaking his business website from the ground up. I'm pretty new to web design and am learning as I go. Our webhost created a WordPress staging site that I can work on while the original site stays up and running. Recently we've encountered a real problem: a very important page on our original (current) website has a filename that includes an ampersand. It loaded perfectly for customers for over a decade, but now suddenly refuses to load, returning a "bad request" error message for any browser we've tried. The page's URL is in this format:
www.example.com/Gems&Rocks.htm
I changed all instances of '&' to 'n' in the HTML code as well as the file names associated with it, and that got the page working again. Problem is, there are hundreds of other pages across the internet that backlink to this important page under its original name. My boss is adamant that I find a way to get the original filename with the ampersand in there so we don't lose business. He thinks this is all my fault, but I did absolutely nothing to change the old website. The webhost's tech tells me he can't do anything about it, and that this emergent problem wasn't caused by anything he did because he hasn't changed anything on the webserver in over a year. He says the '&' is a reserved character and shouldn't have been in the pathname anyway. Nevertheless, our page loaded just fine for many years.
Searching the web has done me no good, it's like I'm the only person in the world who has encountered this problem. But surely someone else has had such a thing happen. So I guess my specific questions are:
Did pages with '&' in their name suddenly stop loading for everyone or just our website?
Is there a way to "trick" our website into loading the page instead of deciding the '&' is a "bad request"?
Can a URL redirector be set up that sends users from "Gems&Rocks.htm" to GemsnRocks.htm?

The "bad request" error comes from your web host's server. If it worked previously, but now shows that error, then something MUST have changed on the server.
It is possible that you might be able to redirect that request. You don't say what server your web host is using. It's likely to be some version of Apache and you probably have .htaccess configuration available to you. One option might be to put something like this in your .htaccess file:
RedirectMatch 301 ^/Gems\&Rocks\.htm$ https://example.com/GemsnRocks.htm
Whether or not that works will depend on the server that you are running on and how it is configured.

Related

SSRS URLs having issues

A little background info...
By far and large the URLs worked perfectly fine. Occasionally either my machine, or the server itself couldn't access the Web Service URL or the Report Manager URL. For the server a restart fixed this, for me I had to reset my winsock which never worked and ended up System Restoring to a working date.
When I say couldn't access I mean getting the "This Page Cannot Be Displayed" message, or the "Please turn on TLS 1.0 etc etc" message.
The last few days the issue is now widespread. Everyone was having issues gettings to the URLs even the server. I figured it may have been some windows updates causing issues so I removed all the updates around the timeframe in which it started and tested and got nothing.
Came back the next day (today) and same issue except the only way to access it is through a hyperlink thats clicked or copy/pasted.
The issue:
If you manually type the URL it will not work. You have to copy and paste the hyperlink from a working page. I used a link to a rendered report and deleted back to /ReportServer and it pulls up the directory. I've never seen something like this happen before.
The Solution:
Apparently you have to type in www. as well
I was so use to skipping that for most pages.
https://analytics.domain.com/ReportServer = fail
https://www.analytics.domain.com/ReportServer = win

Links not working on first click on oscommerce

There is an oscommerce site that I maintain now. There are some links on the homepage like below when one visits the site first time.
http://website.com/index.php?cPath=2?osCsid=80b28bcd9ad38e38e7ded7e200f87b30
This click leads to Not Found error:
The requested URL /the-carriers-c-2 was not found on this server.
But if I go back on homepage and click then this link works without any problem.
On 2nd visit the URLs change to : http://website.com/the-carriers-c-2.html
This seems to be a very peculiar problem, I am new to oscommerce so not sure what the reason is.
Any help would be great.
What version of oscommerce are you running.
earlier versions of oscommerce required third party mods for SEO URLs. I agree with random, that is a generated url by the system.
you should have an .htaccess file in your root, it may be renaned or missing, also you need to have MOD URL REWRITE running on your apache web server so apache knows to handle these kinds of urls properly.

From the browser, how to make the web server refresh/invalidate a cached static-html-webpage?

PROBLEM:
Today, we modified a static html web page in a client's website -
we added a couple of images and modified the font. And FTPed the file to client's web server.
We realized we made a mistake with the font-size, corrected it, and FTPed the file again.
Even with a 100 refreshes, the website was displaying only the file (with wrong font) that we had FTPed the first time.
We FTPed the corrected file several times, but the file with the wrong font was the only file being served by the web server.
OUR GUESS:
We think that the web server cached the file that we had FTPed the first time, and is serving it back to us on subsequent requests even though the file had changed.
We tried the following techniques (but were unsuccessful):
We added a parameter to the querystring (?R=33343545)
We tried the technique suggested below - i.e. posting to the webpage in question, but got a "405 Method not allowed. The HTTP verb used to access this page is not allowed."
http://www.mnot.net/blog/2006/02/18/invalidation
Please advise if we were on the right path and if there is anything else that we can try in such situations ?
EDIT:
We would like to find out if there is a way (similar to the 2 methods above) to do it just from the browser..and not touch the settings on the webserver.

Cannot find URL when duplicating site

So I have a booking system on my website with the URL domain.co.uk/booking. I wanted to add it to a different site I have, domain.com.au/booking. It is a simple drag and drop then run an install.php file. However my domain.com.au/booking does not find anything there. the files are there in the EXACT same way as they are in my domain.co.uk site which runs fine. Are there any reasons why the path would not be found that i may simply be over looking?
N.B the error that appears is
The requested URL /booking/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
If you are on a linux server, /booking/ does not equal /booking. That could explain the difference between the two sites (one is hosted on linux, the other is not).
Though this is just a wild guess.

URL opening error in Flash CS4

I have a script that loads a php page for variables. There are no problems when the swf is uploaded to the site but when I run it locally, I keep getting "Error opening URL" messages. I'm using absolute pathing and if I paste the URL my script is using in a browser, the correct page opens. This only started happening after the site changed servers. Any ideas what the problem could be? Thanks.
The "Error opening URL" seems to be caused by a number of issues. I have tried to keep track of all the different solutions I have used in the past to fix the problem. Ever time I encounter the "Error opening URL" the solution is different. Hopefully one of these solutions helps you.
I usually find the following solutions on google.
- Make sure crossdomain policy is setup correctly.
- Set a bunch of variables like Security.allowDomain(domainHERE)
- Change publishing setting for your flash file.
- Make sure your connecting to the right url.
Here is what works for me... usually.
1) Make sure you are connecting to the right URL.
Use the full path, don't use relative links. Also, copy and paste the url in your web browser to see if it connects.
You can also use flash.events.HTTPStatusEvent.HTTP_STATUS to view the HTTP headers but I would recommend you check out solution 5 first. Its a much easier way with more details.
Source: http://www.judahfrangipane.com/blog/2007/02/15/error-2032-stream-error/
2) Put a crossdomain.xml file in the root of your server (usually public_html or www)
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
Source:
http://www.senocular.com/pub/adobe/crossdomain/policyfiles.html
3) While editing the flash file, press Ctrl + Shift + F12
Make sure Local playback security is set to Access Network Only.
4) If you are hosting locally using MAMP, WAMP, XAMP or something similar, skip this step. Otherwise, Call your webhost and yell at them ;)
I have hosted with godaddy, hostgator and liquidweb. It seems that all of them have some kind of firewall setup blocking flash from accessing the files you want it to.
Give your host a call, tell them your problem and ask them to whitelist the files you are trying to connect to and you should be good to go.
Remember, everytime you want to connect to a new file, it has to be whitelisted. I always forget this and it takes me 3 hours to figure out why changing the name of my file or moving it messes everything up. :)
5) Use Charles Web Debugging Proxy Program to gather some important information.
I will break this down into a few steps.
Usually for me the "Error opening URL" is due to a coding problem on the site I'm trying to connect to.
Open Charles
Run your flash file
Select the site your flash file tried to connect to in Charles side bar.
View the Response tab near the top.
On the Response tab you should see a few other tabs near the bottom. View the Headers tab.
See what HTTP_Status was returned. Then look search this page to see what that status code means. It will give a somewhat broad definition but it still helps narrow things down.
500 Means a problem with your server... If your server is running fine, then its most likely a code problem.
Then view the Text tab near the bottom of the Response tab. This will show you exactly what that webpage looks like to flash. If your server is in some kind of debug mode where it displays errors, this is where you will see them.
Well I hope this helps someone. I will try to continue to update it with more issues and solutions I run into. This is probably the number one problem I run into with flash. Super annoying!
Crossdomains.xml file possibly?
not really a solution, but a work-around:
before CTRL-ENTER on your .fla, do a CTRL-S
this seems to work about 90% of the time for me
NOTE: I never had this problem until one random day about 6 months ago. Now it plagues most of my old projects, cs4 or cs6.