Links not working on first click on oscommerce - html

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.

Related

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

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.

Can't find pages' URL after database renew Wordpress

I have a Wordpress site since a couple year hosted on a trusted domain. A couple weeks ago i forgot to renew my mySql database and obviously the site went down. To give my user a way to contact my shop i created another index.php and, after saving the old index.php given by the Wordpress theme, i deployed it on the server using Filezilla. Yesterday my domain was renewed and they told me everything is working, so i deleted my new index.php page and i deployed back the one got from the WP theme.
Now the home page works wonder, but if i try to show any other page i get a "Not Found - Requested URL was not found on this server". I tried to create another simple page to see if that works, and i get the same error. I didn't change anything in my file system bar index.php, and i'm pretty sure that's the one i used to have before my database went down.
Any ideas?
First of all, thanks #mevius for your answer. Unfortunatly that was one of the first things i tried and it didn't work. What i ended up doing was download the content of my MySql DB and exported all the tables into another DB that shared the host with the first one. After doing that i edited the wp-config file changing the DB name and my website works like a charm again. Thanks!

image existing on http://website.com but not on www.website.com

I uploaded an image earlier today and it works fine so long as i do not type www into the URL in front... We have had this problem multiple times and I have no idea why this keeps happening or what I can do to help the problem...
I have tried to access from multiple browsers and computers to see if it's a caching issue but alas, it does not seem to work...
I have used both google AND the stack overflow search functions in an attempt to find someone else with the same problem. Maybe I'm not very good at googling, but I wasn't able to find someone else. I did find qiestions that asked between the differences between using www and not using it, but not a single of them had files that could be located on one of them while not on the other.
Which website?
A webserver can respond to
domain.com
or
www.domain.com
Some webserver respond to both of them (depending on the configuration), but there is no guarantee.
The keyword is Webserver Domain Binding or Virtual Host here.
You should open DNS configuration page, in CNAME Record section, add more this record:
Whereby, your images will existing on both http://www.example.com and http://example.com

Some images won't show when moved Wordpress site to another domain on same server

I've developed a new wordpress website on a testing domain name on our server.
I had set the site up ready to go live... but I had to move the wordpress website onto another domain name that we are also hosting on our server.
So what I did was copy all root folder content from the testing domain name and pasted the content into the new domain name's root folder.
I then logged into wordpress, changed all the necessary settings like WORDPRESS URL and SITE ADDRESS URL as well as image absolute urls in each and every individual pages to make sure that I've got the right URL for everything.
When I click on MEDIA, I can see all the images like normal.
Great ... then I go and check the website live and I see that there are a lot of images that are missing! They are all in the MEDIA panel - but do not show up on the website!
I then double check that all images are pathed correctly ... and they all are.
Now why do SOME images show up and others don't?
I've even tried to add a new photo and use that photo in place of another photo that isn't showing up and that new photo doesn't even show up.
Where does my problem lie?
For example, 1 slideshow on my website which isn't showing images, give me an "image not found" error for a image:
Image not found: http://www.domain.com/wp-content/themes/natural
/lib/timthumb.php?src=http://www.domain.com/wp-content/uploads/2012/08/breakfast-gallery-011.jpg&w=610&h=0&zc=1
Ok I am going to answer my question with some advice.
It's clear that some of my images were 'hard coded' as devin mentioned as I could not find a logical reason for some not showing (even when I looked at the tabular data in MySQL) and because I'm not a database engineer / developer - I wasn't prepared to dive too deep into that with the possibility of causing further issues... so I decided to take down the entire wordpress site, create a new database, re-install wordpress and I imported an exported xml file that I created and saved (luckily) before 'migrating sites'.
Advice:
1) Whether you migrate a wordpress site or not, always backup your website regularly by creating an export of your wordpress structure. It may save you a lot of work in future.
2) If you're an amateur or beginner at development and MYSQL like myself, I'd suggest you create your wordpress site on the actual domain name you want it on. This will save you from 'migration' headaches as I've just experienced ... and a lot of time. Learn from my mistakes. Although there is probably a solution to my question above, it's out of my expertise / knowledge and could be out of yours too... so make it easy for yourself :)
The issue is not that the image URls are hardcoded only. The last portion of the URL is harcoded, but you will most likely have "/wp-content/" embedded in the URL which indicates that the image's URL string is dynamically created. I looked in my wp_postmeta table and there were all of the partial image URls ( like this - 2013/03/expanse2.jpg ). Now where is the beginning part of this URL and the domain name? The domain name is the part that is actually missing from the all of the image urls in my case. I dug into the database a little deeper using phpmyadmin ( but i recommend Webmin if you can get it up and running ). I ran into the "home" field in the "wp_options" table. Asked Google what a proper "home url" would be for wordpress, which brought me to this page ( http://codex.wordpress.org/Function_Reference/home_url ) , and this line was in there ( home_url() is located in wp-includes/link-template.php. ). Went to that file and found that it controls how URLs are built, but not uploaded image urls specifically. In the end i went into a page that had an image, looked at the advanced settings and found the image URL was just missing the domain. I used the wonderful search and replace script to repair it. Done

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.