1 (edited by mikecarpenter 2012-06-14 17:22:15)

Topic: Using internal dynamic page instead of HTML page

When I click on a category name, then click a product title, it tries to load

\catalog\product_title.html

When I click on a product name in the "Latest Additions" section, it loads the dynamically generated page for the product.

How do I make it so that clicking a product title ALWAYS loads the dynamic page instead of the .HTML page? I don't want to have to make .HTML pages for each product.

Also, the "featured products" on the home page automatically go to the .HTML page as well. Is there a way to just turn off the .HTML pages altogether?

Thanks.

Re: Using internal dynamic page instead of HTML page

This is a SEO feature and it uses rewrite rules to make the dynamic pages appear as if they are HTML pages. You don't have to create any HTML pages, it just makes it look as if you had, which can increase your ranking in search engines by having the name of the product appear in the URL and by appearing to be a static page. It can be turned off through an option on the page Configuration->Shop Parameters (SEO Friendly URLs) which will make the default URLs use the index.php?product=X format instead.

Re: Using internal dynamic page instead of HTML page

I have turned off the SEO Friendly URL's option but it continues to point at the .HTML files instead of using the index.php?product=X format. I'm not sure what I could be missing with this because it works great when selecting a product from the "Latest Additions" section but not when browsing Categories.

Re: Using internal dynamic page instead of HTML page

Another way to go I guess would be to get the redirects working. Any documentation floating around on how to do this under windows server?

Re: Using internal dynamic page instead of HTML page

I sorted this out. I had to turn off the SEO Friendly URL's option, then go in to each product and clear the "Details URL" field and update the product. That put it back to the index.php link instead of the .HTML like.

Luckily I only had 4 test products in the site smile

Re: Using internal dynamic page instead of HTML page

It is supposed to be possible to make rewrites work on a Windows server, but unfortunately I haven't tried it myself. There should be a module for the IIS webserver that lets you do something like this.

Re: Using internal dynamic page instead of HTML page

I have the same problem as described by Mike. I am using a Linux server. Do we need a file on the server to redirect urls from /catalog to possibly index.php ? Say "RewriteRule" rules in the .htaccess file ?

Re: Using internal dynamic page instead of HTML page

The .htaccess file in the /catalog directory will usually make the SEO friendly URLs work, but only if Mod_Rewrite is supported by the server your AShop is hosted on. In some cases, I've found that the .htaccess file must be modified, adding another ../ before ../index.php, when the AShop is on an addon site on a cPanel hosting or on GoDaddy. If this doesn't work, you probably don't have Mod_Rewrite and the only way to fix the details URLs in this case is to deactivate SEO Friendly URLs in the settings. You will then need to update the URL on any existing product details pages (click Details on Edit Catalog and empty the URL field to reset it) to make them use the standard URLs instead (index.php?product=n).

9 (edited by be.johnsen 2012-12-03 06:08:24)

Re: Using internal dynamic page instead of HTML page

That solved it! I am hosted on GoDaddy with Linux. I put the extra ../ in front of ../index.php in the .htaccess file in the /catalog directory. My .htaccess now looks like this. SEO is working now.

Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteRule ^(.*)\.html$ ../../index.php?product=$1 [NC]
RewriteRule ^([^/]+)/?(.*)\.html$ ../../product.php [NC]

I'm not sure if I need the extra ../ in front of ../product.php