Another 301 Redirects thread

Hi Guys firstly let me apologise because i know there are hundreds of threads re this however most of them seem to be regarding a specific issue. Or I have tried to implement what was suggested without any luck.



ok so i am trying to put some redirects in the HTAccess file but some of them aren't working.



working:

RewriteCond %{REQUEST_URI} .*\/contact\.php
RewriteRule ^.*$ http://www.lillevilla.co.uk/index.php?dispatch=pages.view&page_id=1 [L,R=301]




Not working:

RewriteCond %{REQUEST_URI} .*\/lillevilla_cabin\.php\?cat=sheds&id=9$
RewriteRule ^.*$ http://www.lillevilla.co.uk/index.php?dispatch=products.view&product_id=3 [L,R=301]




the URL that I need to redirect from is 'http://www.lillevilla.co.uk/lillevilla_cabin.php?cat=sheds&id=9'



I'm assuming that the issues is because of the format of the original URL is this correct?



Can anyone offer any help please?



Thanks



Mark

I had the same issues and in the end got it working using the normal layout of the urls. So I think:


RewriteCond %{REQUEST_URI} /lillevilla_cabin.php?cat=sheds&id=9$<br />
RewriteRule ^.*$ http://www.lillevilla.co.uk/index.php?dispatch=products.view&product_id=3 [L,R=301]
```<br />
<br />
Also important, make sure to put these sorts of rewrites above<br />
<br />
```php
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . index.php?sef_rewrite=1 [L,QSA]<br />
<br />
</IfModule>
```<br />
<br />
in your .htaccess<br />
<br />
Hope this helps, have been in your position and it's extremely frustrating! <img src="upload://b9o42KN0cNJpyPMPUAS1buTz5bR.gif" class="bbc_emoticon" alt=":D">

[quote name=‘Flow’ timestamp=‘1323095708’ post=‘127283’]

I had the same issues and in the end got it working using the normal layout of the urls. So I think:


RewriteCond %{REQUEST_URI} /lillevilla_cabin.php?cat=sheds&id=9$<br />
RewriteRule ^.*$ http://www.lillevilla.co.uk/index.php?dispatch=products.view&product_id=3 [L,R=301]
```<br />
<br />
Also important, make sure to put these sorts of rewrites above<br />
<br />
```php
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . index.php?sef_rewrite=1 [L,QSA]<br />
<br />
</IfModule>
```<br />
<br />
in your .htaccess<br />
<br />
Hope this helps, have been in your position and it's extremely frustrating! <img src="upload://b9o42KN0cNJpyPMPUAS1buTz5bR.gif" class="bbc_emoticon" alt=":D"><br />
[/quote]<br />
<br />
Thanks for the suggestion unfortunatly i have tried it...<br />
<br />
I'm sure i am missing something simple but the fact the other redirects are working suggests there is nothing very wrong with the htaccess file. it must just be to do with those URL's.<br />
<br />
anyway thanks for the suggestion. If anyone else has any suggestions i would really appreaciate it!<br />
<br />
Thanks<br />
<br />
Mark