Jump to content

Search Engine friendly URLs problem


vidmarc
 Share

Recommended Posts

As an experiment, remove this:

RewriteCond %{HTTP_HOST} !^nucleusfilms.com$

RewriteRule ^(.*)$ http://www.nucleusfilms.com/$1 [R=301]

 

Then, the following wierdness has been discovered: if you are using the Chrome browser, "Too Many Redirects" could be caused by the weird fact that your computer's time may be off by too many minutes. Please verify that your computer's time is set as closely as possible to the real world time.

 

Still no luck I'm afraid :(

 

All the product links are messed up. and resulting in 404s

 

My Mac's time is correct and is automatically set.

http://www.nucleusfilms.com/education-anglaise-p24-p25-p26-p27-p28-p29-p30-p31-p32.html


http://www.nucleusfilms.com/death-ship-p16-p18-p19.html
Link to comment
Share on other sites

ps - my server info: 

 

System Linux infong 2.4 #1 SMP Fri Mar 22 18:19:29 CET 2013 i686 GNU/Linux

 

Can any other info be gleaned from my PHP info file?



I just found these links, can anyone help me re-jig it?

 

http://www.cubecartforums.org/index.php?showtopic=9282

 

 

https://www.helpsheets.co/questions/60-1-1-mod_rewrite

 

and this is from 1&1's support pages:

 

You can adjust the Apache webserver properties to your needs by editing a control file. You can list various commands in this file enabling you to control access to a directory, to have custom error pages, to list the content of directories, etc.

 
The control file .htaccess can be placed in various directories of your site. Please note that commands in a .htaccess file affect ALL subdirectories as well!
 
Whenever using mod_rewrite and/or the rewrite engine, it MAY not function properly on standard shared hosting and/or managed servers without the following line added before it in the .htaccess file:
 
Options -MultiViews
 
The following list is a selection of commands which can be used in a .htaccess file:
 
Command Description
ErrorDocument Define your own error pages.
AddType Assign a MIME-Type to a file ending.
RewriteEngine Activate mod_rewrite module
Allow/Deny Host or IP based access control
FilesMatch File based access control
AuthType "Basic" password check
Redirect Redirection to another page or site
Options (de)activate index, symbolic links, etc.

 

Link to comment
Share on other sites

If I use this URL:

http://www.nucleusfilms.com/education-anglaise.html

I get a 404. That tells me that the rewrite engine may not be enabled, or something before the CubeCart-relevant statements in the .htaccess file is getting triggered before the seo_path rewrite statement is executed.

 

If I use this URL:

http://www.nucleusfilms.com/index.php?seo_path=education-anglaise

I get the page. That tells me that the SEO path has been found in the database and CubeCart has the correct product to display.

 

So where are the URLs with all the -p## parts coming from? Are they viewable somewhere in CubeCart? If not, but you are finding them somewhere else, then the problem is with the somewhere else.

Link to comment
Share on other sites

I removed the .htaccess file as it stopped the site working.

 

That's interesting about the url you list though- I suggest the clue is in the .htaccess file's code, but it's out of my scope. Can you have a look at my previous post as I suspect the answer is there.

 

The urls with all the -p## parts are nowher eon the site.

Link to comment
Share on other sites

Go to CubeCart's Store Settings page, Search Engine tab, and have CubeCart install it's internal copy of a known good .htaccess file to your site. Not having a properly coded .htaccess, or not having a file at all, will cause 404 errors when CubeCart's settings say to use search engine friendly URLs.

Link to comment
Share on other sites

I installed the Cubecart .htaccess file when I first installed Cubecart and it didn't work.

 

Here's the file that's currently displayed in Store Settings -> ".htaccess file content"

 

I've just gone ahead and re-installed it, I'll leave the site running with it so you can check what is happening...

## File Security
<FilesMatch ".(htaccess)$">
 Order Allow,Deny
 Deny from all
</FilesMatch>

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

#### Rewrite rules for SEO functionality ####

<IfModule mod_rewrite.c>
  RewriteEngine On

  ######## START v4 SEO URL BACKWARD COMPATIBILITY ########
  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule cat_([0-9]+)(.[a-z]{3,4})?(.*)$	index.php?_a=category&cat_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule prod_([0-9]+)(.[a-z]{3,4})?$		index.php?_a=product&product_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule info_([0-9]+)(.[a-z]{3,4})?$		index.php?_a=document&doc_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule tell_([0-9]+)(.[a-z]{3,4})?$		index.php?_a=product&product_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule _saleItems(.[a-z]+)?(?.*)?$		index.php?_a=saleitems&%1 [NC,L]
  ######## END v4 SEO URL BACKWARD COMPATIBILITY ########

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*).html?$ index.php?seo_path=$1 [L,QSA]
</IfModule>
Link to comment
Share on other sites

I'm seeing, for just a few products, that have a friendly URL that doesn't make any sense (Night of the Bloody Apes with death-ship-p16-p18.html, for example).

 

This is product_id=18 as that is the key name of the Qty field of the Buy button (in the View Category page).

 

I suggest that vidmarc look at product #18's SEO tab and enter a friendly URL that makes sense (night-of-the-bloody-apes, for example).

 

NUC0013 and NUC0013A have similar friendly URLS, but NUC0013A can use some custom attention. Fix NUC0014, 15, 19, etc.

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...