Forum Moderators: phranque
The software, with .htaccess, rewrites category.php as a directory based on the requested category name, like so:
/main/category/
Then for products, the same idea:
/main/category/product/
Ok, here's what I have currently in htaccess:
RewriteEngine On
RewriteBase /
RewriteRule ^main/([^/]*)([/]*)$ /category.php?cid=$1
RewriteRule ^main/([^/]*)/([^/]*)([/]*)$ /product.php?cid=$1&uid=$2
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain\.com
RewriteRule ^(.*) [mydomain.com...] [L,R=301]
With this setup, a request for:
[mydomain.com...]
redirects to:
[mydomain.com...]
Is there a way to preserve the structure? E.g.
[mydomain.com...]
For now, as a workaround, I've simply put a META Robots noindex dynamically on pages accessed in the last format shown above.
Any ideas?
Thanks in advance.