URL redirect to other pages

I see most of my URL is redirecting to other pages. Will anyone please help me. :confused:

hi miracles

cs-cart need this to redirect easy within modify htacess



or small addon to redirect to 301 any url and 404 error page



I need to change my shopping cart in the prox 6 month to cs2.1.xx and I do not want to lose all my years working Positioning my product in google.



My structure url is very diferent What should I do?

lose my serp position in google ?

301 redirect in htaccess one by one for 2000 products?

Right now I am in the middle of redirecting all of my urls in .htaccess. It really is the only way to do it.



For the best results, don’t use the cpanel redirect. You will end up with "index.php?sef_rewrite=1 " at the end of all your urls.



The way to do it is to add the following for each url BEFORE the code default for cscart in htacces:



RewriteRule ^youroldcategory/youroldproduct.html$ /younewcategory/yournewproduct.html [R=301,L]




Just make sure that you have one space between the last html and the [R-301,L] or it won’t work.



I just copy and paste all the way down.



I’m sure you can make an excel file that will automate some of it. Ideally, you could make a column for your old products, which you could paste from exported files, and then in next column manually add the new url. Then in the last column, you could have the final redirect command with a paste command from columns a and b.

I only just got the redirect down without the sef rewrite issue, so I haven’t tried the excel idea yet.





good luck!

Thanks for sharing!

You can use this rewrite rule as well:


```php RewriteEngine on

For categories ####

RewriteCond %{query_string} idCategory=1234

RewriteRule (.*) yourdomain.com? [R=301,L]


For products ###

RewriteCond %{query_string} idproduct=1234

RewriteRule (.*) yourdomain.com? [R=301,L] ```

[quote name=‘indy0077’]You can use this rewrite rule as well:


```php RewriteEngine on

For categories ####

RewriteCond %{query_string} idCategory=1234

RewriteRule (.*) yourdomain.com? [R=301,L]


For products ###

RewriteCond %{query_string} idproduct=1234

RewriteRule (.*) yourdomain.com? [R=301,L] ```[/QUOTE]



Thank you, indy0077!:wink:

[quote name=‘indy0077’]You can use this rewrite rule as well:


```php RewriteEngine on

For categories ####

RewriteCond %{query_string} idCategory=1234

RewriteRule (.*) yourdomain.com? [R=301,L]


For products ###

RewriteCond %{query_string} idproduct=1234

RewriteRule (.*) yourdomain.com? [R=301,L] ```[/QUOTE]



This in not working for me, is there a trick to it?

I added before “DirectoryIndex index.html index.php” in .htaccess file.



Sample:

```php RewriteRule ^no-directory-page.html$ /directory/page.html [R=301,L]

RewriteRule ^contact_us.html$ /contact-us.html [R=301,L] ```

[quote name=‘grabbags’]I added before “DirectoryIndex index.html index.php” in .htaccess file.



Sample:

```php RewriteRule ^no-directory-page.html$ /directory/page.html [R=301,L]

RewriteRule ^contact_us.html$ /contact-us.html [R=301,L] ```[/QUOTE]



Thanks grabbags that worked for me :slight_smile: