Help 301 redirect in .htaccess

In need to rewrite

Nothing I have done seems to work.

You could be asking 2 things… do you want to have SEO URLS in your entire shop? If so, did you install the SEO add-on?

Or… if you would like to keep ranking from an old site…Try:

RewriteCond %{REQUEST_URI} /index.php?target=categories&category_id=4
RewriteRule ^.*$ [L,R=301]

Put this directly under:

```php RewriteEngine on

Some hostings require RewriteBase to be uncommented


Your store url is

So “RewriteBase” should be:

RewriteBase /store/cscart ```

[quote name=‘Flow’ timestamp=‘1313400886’ post=‘119519’]

RewriteCond %{REQUEST_URI} /index.php?target=categories&category_id=4<br />
RewriteRule ^.*$ [L,R=301]
```<br />
<br />
<img src="upload://b9o42KN0cNJpyPMPUAS1buTz5bR.gif" class="bbc_emoticon" alt=":D">  Didn't work. put me straight to the main page<br />
<br />
I have upgraded from 1.3.5 no seo to 2.2.1 with seo and want to keep my google sitelinks

Bring this topic back up. Does anybody know if this possible. I've updated from 1.3.5 to 2.X, and I am using SEO friendly links everywhere. Thing is, like kogi, I have links all over Google that are pointing to and I need them now going to

I can't figure it out. I did a simple line in the hataccess file.

Redirect 301 /index.php?target=categories&category_id=98

When I try to open old links, it bounces them to the homepage but the url in the browser bar shows the old link. I need this to do a true redirect, is it possible?

I found some old links on websites that I have no control over that are bringing an increase in traffic.

I riddled out what I had to add to .htaccess to make those old query strings work.

For each category you need to redirect use this:

RewriteCond %{QUERY_STRING} ^target=categories&category_id=219$ [NC]
RewriteRule ^index.php$ https://your-domain/path-to-category/category-name?[L,R=302]

The category_id value in the string is the actual category id in the old link

and the path to category and category name are your current values.

You can change the R=302 to R=301 after testing (R=302 is for a temporary redirect and prevents your browser from thinking the redirect is permanent until you are ready to make it permanent),

Don't forget to include the "?" after the new URL so the old string is not appended.

And place the condition and rule after "RewriteEngine on" in your .htaccess file.