Google Answers Logo
View Question
 
Q: .htaccess query ( No Answer,   0 Comments )
Question  
Subject: .htaccess query
Category: Computers > Internet
Asked by: advenlo-ga
List Price: $50.00
Posted: 11 Jul 2006 12:43 PDT
Expires: 10 Aug 2006 12:43 PDT
Question ID: 745361
As a non technical webmaster I'm seeking some guidance. I've tried to
research but just ended up wasting aspirin!
I have inherited a website with many products. Each product has many
pages, differentiated in their urls by mydomain.com/product=1,
product=2 etc.

The pages are largely similar and I wish to redirect all the =2, =3
pages to mydomain.com/product=1. As there are thousands of products,
is there a simple way of using .htaccess to do this with a permanent
redirect? If so could someone with a larger brain than me please
provide?

Many thanks in advance.

Request for Question Clarification by sublime1-ga on 11 Jul 2006 14:31 PDT
advenlo...

See if this makes things a little easier...

This article on webconfs.com details how you can rewrite entire
directories of URLs, if your site is hosted on an Apache server,
using the Mod Rewrite Rule and the URL Rewriting Tool, and adding
the generated code to your .htaccess file:

"You certainly don't want to have to go back and recode every
 single dynamic URL into a static URL. This would be too much
 work for any website owner.

"If you are hosted on a Linux server, then you will want to make
 the most of the Apache Mod Rewrite Rule, which is gives you the
 ability to inconspicuously redirect one URL to another, without
 the user's (or a search engine's) knowledge. You will need to
 have this module installed in Apache; for more information, you
 can view the documentation for this module here. This module
 saves you from having to rewrite your static URLs manually."

[...]

"With the URL Rewriting Tool, you can opt to rewrite single pages
 or entire directories."
http://www.webconfs.com/dynamic-urls-vs-static-urls-article-3.php

The URL Rewriting Tool. Note that the tool returns code options
for both single page redirection or entire directory redirection:
http://www.webconfs.com/url-rewriting-tool.php

Mod Rewrite Rule Documentation:
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

If this satisfies your needs, let me know so I can post it as a
formal answer.

sublime1-ga
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy