You are here:  » URL re-write?

Support Forum



URL re-write?

Submitted by matmatoo on Mon, 2011-10-10 09:17 in

HI David,

I'm just wondering about URL's and google/other search engines.

By default, my product URL's are written like "http://www.example.com/products.php?q=Apple+iPhone+3G+S"

But I'm scared that Google will miss them because they are not a proper .html website like: "http://www.example/products/AppleiPhone3GS.html

I've seen a few posts about URL-rewrite, but am unsure... will the spiders pick up my product pages with the default URL method or should I change the pages to be .html pages?

Thank you
Matt

Submitted by support on Mon, 2011-10-10 11:52

Hi Matt,

Rewrite is supported it sounds like it's just not enabled yet on your site - that's all. To enable, first edit config.php and change line 8 as follows:


$config_useRewrite = TRUE;

Finally, you need to create a .htacess file as a copy of htaccess.txt from the distribution. The easiest way is normally to use your FTP program. In the remote window, Right-Click on htaccess.txt and look for the Rename function and then rename to .htaccess

For an installation at the top level no changes are required to htaccess.txt from the distribution, but for a sub-directory installation the RewriteBase entry at line 5 must be changed accordingly, e.g.

RewriteBase /comparison/

Cheers,
David.
--
PriceTapestry.com

Submitted by matmatoo on Mon, 2011-10-10 12:02

Hi David,

Sorry to be a pain - I enabled useRewrite = TRUE; in the config.php file, but keep getting the following error when I access a product:

Not Found

The requested URL /product/Asus-Eee-Pad-Transformer-TF101-with-Keyboard-Dock-32GB.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

order deny,allow
deny from all
allow from all

order deny,allow
deny from all

AuthName domain.com
AuthUserFile /home/**user**/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/**user**/public_html/_vti_pvt/service.grp

I'm not too sure what to do now..

Submitted by support on Mon, 2011-10-10 12:45

Hi Matt,

The contents of .htaccess that you posted above are not from the Price Tapestry .htaccess, however there are aspects in there that indicate that you may be using Windows/IIS web hosting which doesn't support .htaccess (which is a native Apache feature)

First though, assuming that you do have a .htaccess in place, first make a backup copy on your local computer; and then if you could replace it with the Price Tapestry version as described previously (from a copy of htaccess.txt) that should help..

Cheers,
David.
--
PriceTapestry.com

Submitted by matmatoo on Mon, 2011-10-10 20:04

fantastic - thank you!

Submitted by Mendi on Tue, 2012-03-13 00:26

very simple how to post for url rewrite rules on IIS without too much headache.
http://thomas.bindzus.me/2010/06/23/setup-recess-framework-on-windows-7-using-iis-7/

just remove line 5 from htaccess.txt file. and it will do the trick
RewriteBase /

Submitted by support on Tue, 2012-03-13 10:15

Thanks Mendi!

Cheers,
David.
--
PriceTapestry.com