Jump to content

404 Page Question


Shari Marie
 Share

Recommended Posts

My store name and web address are the same as my old site.  I  have a lot of images of my products pop up on Bing/Google searches. When I click on the sharimariecreations.com links provided, it takes me to my new site, but  not the home page.  There are dozens  and dozens of these on pinterest as well and they all end up on my CC site but not the home page, Instead I am getting

404 - Page Not Found

Sorry but the page you are looking for could not be found.

 

How can I redirect my old store links to go to my current site without the 404-Page not found.  I would like to at least have them directed to the actual home page.

If possible, I would REALLY love for them to land upon the page for the actual product they were interested in (assuming I have them listed on the new site, I am still working diligently getting everything back on line since my disaster)    That may be a more complicated fix so For now I would be happy enough just to redirect from the 404 to the actual home page.

Thank you.

Link to comment
Share on other sites

There are two scenarios: the URL is one that CubeCart does not understand, and the URL is one that CubeCart does understand but is referencing a product, document, or category that CubeCart does not have a search-engine-friendly phrase for in its database (the product, document, or category may not yet exist).

We can make some edits to the codebase that will show the Homepage in these scenarios.

We can also change the wording of the message to better reflect what happened. Let's look at this approach first.

In admin, Languages, click the edit icon of the language being used. Choose Documents from the selector. Scroll to '404_title' and '404_content'. Change the phrases to whatever message you wish to convey. Perhaps, "I don't have this yet." and "Please feel free to use the Advanced Search feature of our site. We may have what you are actually looking for under a different name."

I'll have suggestions on what to edit in the codebase later.

Link to comment
Share on other sites

Having all of these links directing to the homepage is a VERY bad idea and making changes to the core code to facilitate this is even worse !  If you really want everything to go to the homepage, create 301 redirects in your .htaccess (still a BAD idea) but by far the best way forward is to create 301 directives for each of these urls and redirect them to the equivalent page (or nearest in content) in your new store.  You have indexed links and content on other sites that could be providing SEO link juice to your new site and you are about to throw it away !

Ian

Link to comment
Share on other sites

Thank you both for your replies.  Bsmithers, I was able to find and edit the 404 error page message...happy about that.

Ian, I am new to all of this but learning all the time with thanks to help from this amazing forum.  I found the Redirect function in my server's c panel.  I attempted a redirect for a page from my old site to my new site. I still seem to end up on  the cc 404 page (I edited it so it no longer reads 404 etc) 

the original page address was                http://www.sharimariecreations.com/page89.html

the new page needs to be                       http://www.sharimariecreations.com/hen-house-collection.html

Here is what I did, but its not working so I must have something wrong.

2017-01-27 (1)_LI.jpg

Link to comment
Share on other sites

Hi

What you have done via cPanel is correct but cPanel isn't very good at adding the redirect directives in the correct place in the .htaccess file and unfortunately, the exact position in relation to other directives is very important and so you will almost certainly need to manually change this.  We do this for all our CubeCart hosting customers so you could try asking your hosting company but many won't support this as they consider it an application issue

Ian

Link to comment
Share on other sites

6 minutes ago, havenswift-hosting said:

What you have done via cPanel is correct but cPanel isn't very good at adding the redirect directives in the correct place in the .htaccess file and unfortunately, the exact position in relation to other directives is very important and so you will almost certainly need to manually change this.

Is this something I would be able to do myself? The  redirect directives you speak of doing manually, where would I find info on how and what to edit?   If I take this to my hosting company (Hostgator) what exactly do I ask them to change?  Honestly, this makes me a bit nervous. 

ALSO, I have been clicking on random links to my sight on Pintrest this afternoon.  Most take me to the 404 cc page (not too bad at this point) ,  and every now and then I get the following Fatal error message:

Fatal error: The file /home1/sharimw/public_html/init.php was encoded by the ionCube Encoder for PHP 4 and cannot run under PHP 5.5 or PHP 5.6. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for either PHP 5.3 or PHP 5.4 or PHP 5.5 or PHP 5.6. in Unknown on line 0

 

Link to comment
Share on other sites

Let me ask about page89.html.

What is the 89? Is this a reference to an actual product_id? Or is page89 simply the 89th page of a collection of chronologically-created pages that have no bearing on what is actually on that page? (My first interaction with an older CMS did it this way.)

If 89 is the product_id, then we can construct a parser that will get us to the proper associated page.

The file ini.php might be residual from what was located in these folders before. I would strongly suggest searching out non-CubeCart files. Such remnants have no reason to be there.

For such URLs that point to these remnants, that scenario is a classic reason to rewrite them to a simple index.php.

Link to comment
Share on other sites

Whether you can do it yourself is dependent on your skill levels but it is a case of changing the .htaccess file and re-positioning these newly added redirect directives to different locations so they don't interfere with each other.  Hostgator would be able to easily see what the problem is - it is just a case of whether they will be willing to make these changes.

The ionCube error is due to a file that isn't part of standard CubeCart so further detailed investigation would be needed to look at where that file comes from unless you know a mod or plugin that has added this.

Ian

Link to comment
Share on other sites

BSmithers,   89 is the 89th page I created on my old site. This is how the site builder I used named the pages and I left them numbered as is. Each page represented a specific product, 89 was not the product ID, only the page in which the info was listed.  There was an outside script for the instant download cart that I linked with a add to cart button from page89. That cart is no longer supported. When the customer added it to their basket and paid, they were automatically directed to the cart . There, in the cart script, I would add the product id, price, and additional info .  I didn't want to use the cart script on its own because while it got the job done, it didn't have the look and feel I was going for.  I hope I am making sense here. 

Ian  Perhaps the IonCube issue  is related to that instant download script I had been using.  I began using that about 9-10 yrs ago. The writer of the script installed it for me. There was a one time cost and it served me well until one day out of the blue I was unable to access the cart to edit or add products. I guess he moved on to bigger and better things and deleted/changed the license or passwords to it.  He is no where to be found, im guessing he moved on to bigger and better things. Anyway,i have moved on from that but that is why I had to build this new site.

Link to comment
Share on other sites

Too bad about the page89 thing. That will be a bummer to hash that out.

I hear you say that the init.php thing got broke, and it isn't applicable to CubeCart anyway. So, delete the file.

Now, when a link points to that non-existent file, CubeCart will do it's 404 thing.

 

Link to comment
Share on other sites

I had found the file with all of that old cart info in it, and deleted it the other day.  I wonder why I got this fatal error on some links still?

Do I continue and Redirect each page to the new corresponding  product page like in my first example? Is this a waste of time?

If not, where do I go from here? what of the htaccess file?  I didn't really understand all that Ian was saying about that.

 

Link to comment
Share on other sites

"I wonder why I got this fatal error on some links still?"

Good question. (That is to say, I have no idea.) We will need to look again in the directory where your domain points to and verify it is truly deleted.

"Is this a waste of time?"

If you don't want to make a map of old to new pages because of lack of importance or being wholly impractical (way too many incidents), then ending up on CubeCart's 404 page (which we can enhance), or redirected to CubeCart's Advanced Search page, would save a lot of time.

The respected HavenSwift is a believer in SEO, so do not dismiss his comments. Creating a set of rules will never be a waste of time.

Do you have a map of the page## and the product it was referencing? If you have that, then we can start creating the redirect rules and getting them entered in the .htaccess file. To start, use the text editor you may have in your hosting account's control panel to become familiar with the file's current contents.

Link to comment
Share on other sites

I probably had about 85 individual product pages (not including the contact/about/misc pages.  I found a back up file in the file manager. Inside it has all of the product pages so I would be able to know what product was represented on each of those pages.   Is that what you meant by Map of the page##.   ?

Link to comment
Share on other sites

Here's the tricky part. The .htaccess filename has a leading period. In typical Linux operating systems, this means such a file is "hidden". File Explorer utilities will often not list "hidden" files and folders. The viewer will need to have that ability enabled. So, somewhere in the File Explorer toolbar or Options menu, there should be a button or setting to show hidden files and folders.

Then, you will find the .htaccess file in Cubecart's main folder.

Link to comment
Share on other sites

Maybe Havenswift can add some guidance, but I think these rules can be trimmed a bit and located in a more appropriate place.

Open the file for editing (there may be a tool button to do this):

Find:

<IfModule mod_rewrite.c>
  RewriteEngine On

Add after:

Redirect 301 /page89.html http://sharimariecreations.com/hen-house-collection.html
Redirect 301 /page61.html http://sharimariecreations.com/paper-doll-collection.html
... add more using the same format...

There are a few different formats to code for the redirect mechanism, and the above (I think) is one of them.

Link to comment
Share on other sites

Thanks, ill give this a try.  Should I remove the redirects done using the cpanel that I did prior first?

Ok I found this:

### Apache directory listing rules ###
DirectoryIndex index.php  index.html
IndexIgnore *

### Rewrite rules for SEO functionality ###
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /                                  (Do I add the changes after this RewriteBase/  ????  or directly after the RewriteEngine ON?)
 
 

Link to comment
Share on other sites

I've  added those changes: 
Redirect 301 /page89.html http://sharimariecreations.com/hen-house-collection.html
Redirect 301 /page61.html http://sharimariecreations.com/paper-doll-collection.html
 

When I type in     http://sharimariecreations.com/page89.html  it takes me to http://sharimariecreations.com/hen-house-collection.html?seo_path=page89

it lands on the 404 page that I edited not on the new product page. (in this case the hen house collection page)

Link to comment
Share on other sites

Until I learn more about what I posted above, try this style:

RewriteRule ^page89\.html$ http://sharimariecreations.com/hen-house-collection.html [NC,R=301,L]
RewriteRule ^page61\.html$ http://sharimariecreations.com/paper-doll-collection.html [NC,R=301,L]
... add more using the same format...

 

Link to comment
Share on other sites

I gave the Rewrite a try. copied, pasted, inserting the required info. in the same place,   we talked about before.

### Rewrite rules for SEO functionality ###
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /         (here)

 The two you posted  worked, as did the next two I did  but when I got to the 5th one, the whole site crashed with 500 error, site not available. So, I immediately deleted the changes, all of them, and contacted my host server via chat. He said I was incorrectly using my htaccess before I even told him what I had done. It took him a while but he was able to get it restored to where it was before I made the changes to the htacess.  I was VERY careful not to delete a single thing when I added the rewrites. I don't really understand what went wrong. I was shocked that even after carefully removing the edits, I still was getting the 500 not available internal error. That was scary LOL  I thought, oh no....what have I done.  I'm not doing anything else tonight. Ill check back tomorrow to see what ideas you may have.  Thank you again Bsmittles, this  process is so interesting and I am learning so much. I have a long way to go obviously haha but I'm trying.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...