Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Author « Topic »  

TastelessApple
Advanced Member

USA
499 Posts

Posted - 03/10/2021 :  12:38:30  
Years ago one of the Third party Ecommerce Templates Developers helped me adjust the URLs for a ECT store. It was almost a hybrid of the static URL and the search engine friendly URLs that are now options. He is no longer around and I'm doing a complete upgrade of the store and would like some input here.

It would be very helpful if the URLs could be the same so all the links keep working as they are... It would also be helpful if I didn't need to create 100s of static pages.

He added a spot in the product admin to input a URL and that became the URL without there being a static page created.

Would it be possible to modify the search engine friendly URL option so it looked at the URL table in the database rather than the product id?

Any other ideas for me?

Thank you,
Josiah

Marshall
Ecommerce Template Guru

USA
1874 Posts

Posted - 03/10/2021 :  14:57:46  
In the product admin you will want to select Has Static URL then type the URL you are currently using there. If the current URLs have space delineaters such as a hyphen or underscore, you will want to remove those and specify which one in the vsadmin/includes.php file. You can do this via a CSV upload rather than one product at a time.

Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

TastelessApple
Advanced Member

USA
499 Posts

Posted - 03/10/2021 :  15:51:03  
Hi Marshall,

I understand what you are saying but I don't see the full picture yet.

Would the product pages be generated via the "search engine friendly url" feature of ECT? If that is the case, what I hear you saying is that the search engine friendly url feature already looks to see the a URL has been added to the product and if so it uses it? If so what about the ".php" that is currently at the end of all the URLs? Could I add that in somehow?

Thank you

Vince
Administrator

42428 Posts

Posted - 03/11/2021 :  04:47:57  
Hi Josiah
It may be an idea to read through the Search Engine Friendly instructions and that should tell you more or less what is available as standard in the cart. Then come and ask if you have any questions...
https://www.ecommercetemplates.com/seo/search-engine-friendly-urls-asp.asp

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

TastelessApple
Advanced Member

USA
499 Posts

Posted - 03/15/2021 :  13:44:33  
Hello,

I have read the instructions and followed them to the best of my ability. I made the changes on the product and category pages, in the includes.php and in the .htaccess file but I’m still having issues. None of the subcategories or the product pages are working, it simply says “Sorry, this product is currently unavailable.“ It has altered the URLs and if I add my own URL in the category admin it links to that new URL but still gives the same message. The product detail pages are working I can get to them easily through the search page. However if I add in a static URL it links to that new URL but the page gives an error saying, redirected too many times.

Any idea I have done wrong?

Vince
Administrator

42428 Posts

Posted - 03/16/2021 :  04:33:05  
Hi Josiah
Can you post the rules you have in the .htaccess file? It's those rules that map the URL in the address bar to the actual page.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

TastelessApple
Advanced Member

USA
499 Posts

Posted - 03/16/2021 :  08:43:48  
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^category/([^/.]*)/?$ /categories.php?cat=$1 [QSA,nc,L,B]
RewriteRule ^products/([^/.]*)/?$ /products.php?cat=$1 [QSA,nc,L,B]
RewriteRule ^manufacturer/?$ /categories.php?man=all [QSA,nc,L,B]
RewriteRule ^manufacturer/([^/.]*)/?$ /products.php?man=$1 [QSA,nc,L,B]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) proddetail.php?prod=$1 [QSA,nc,L,B]
</IfModule>

<Files 403.shtml>
order allow,deny
allow from all
</Files>

The code at the top and bottom were already in there...

TastelessApple
Advanced Member

USA
499 Posts

Posted - 03/16/2021 :  09:32:06  
I left these out of the includes.php because the site said they were optional and I needed the URL to match something different.

$seocaturlpattern="/category/%s";
$seoprodurlpattern="/products/%s";
$seomanufacturerpattern="/manufacturer/%s";

I added it in and the sub category started working as long as I didn't have my own URL in the category admin.

The product pages still aren't working.

Vince
Administrator

42428 Posts

Posted - 03/16/2021 :  10:57:17  
quote:
I left these out of the includes.php because the site said they were optional and I needed the URL to match something different.
You can have something different, but these rules have to match. So for instance if you have...
$seocaturlpattern="/mycategory/%s";
...then you would have to have...
RewriteRule ^mycategory/([^/.]*)/?$ /categories.php?cat=$1 [QSA,nc,L,B]

It sounds like it's nearly working though and it's strange that the category rule is matching but not the products. But if you still can't get it working can you send me the site FTP and URL of where you are testing this.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

TastelessApple
Advanced Member

USA
499 Posts

Posted - 03/22/2021 :  13:26:07  
I found out the reason for my trouble.

I was trying to take out the /category/ and /product/. It just doesn't work to do that.

This is what I had in the includes.php:
$seocaturlpattern="/%s";
$seoprodurlpattern="/%s";

and after Vince's last message I adjusted the htaccess to:
RewriteRule ^([^/.]*)/?$ /categories.php?cat=$1 [QSA,nc,L,B]
RewriteRule ^([^/.]*)/?$ /products.php?cat=$1 [QSA,nc,L,B]

This took me a while to figure out because I could test each piece of the URL feature separately and get it to work, but it seems like they need the distinction when working together.

Am I right?

Are you aware of a simple way I can accomplish this?

Edited by - TastelessApple on 03/22/2021 13:32:59

Vince
Administrator

42428 Posts

Posted - 03/23/2021 :  02:48:31  
Hi Josiah
quote:
Am I right?

Errr, I don't think so I'm afraid as it looks to me like these two rules would match the same URL...

RewriteRule ^([^/.]*)/?$ /categories.php?cat=$1 [QSA,nc,L,B]
RewriteRule ^([^/.]*)/?$ /products.php?cat=$1 [QSA,nc,L,B]

This means that the second would never match as if it would have matched, it would match the first. The standard set of rules includes this...

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) proddetail.php?prod=$1 [QSA,nc,L,B]

...which is a way of saying if it's not a file and it's not a directory, and we haven't matched any of the previous rules (as otherwise we wouldn't be here) then pass the URL to the product detail page as the name of the product. But really, your category and product rules are doing much the same thing so you are not even going to get to the product detail page match.
quote:
Are you aware of a simple way I can accomplish this?
The way the system works is to make patterns which match. So by default anything that starts with /category/ is a category, anything that starts with /products/ is a product page and the rest is a product detail page. I think I know the MOD that you were using and the way it worked was to actually test each URL against possible category names and if it wasn't one of those then try it against possible product names and so on, and that's what you are trying to reproduce, but our system doesn't work like that, you need a pattern.

Vince


Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

TastelessApple
Advanced Member

USA
499 Posts

Posted - 03/24/2021 :  10:36:24  
Thank you thorough answer.

I will make something work.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000