Hi fourroses666,
I think you need the redirect rule above the friendly url code.
And also perhaps slightly different redirect rules (I got these from the forum a long time ago).
Try a redirect rule like this...
RewriteRule ^Test$ http://www.mydomain.nl/contact [L,R=301]
or this...
RewriteCond %{REQUEST_URI} /Test$ RewriteRule (.*) /contact [S,L,R=301]
So your htaccess might look something like this...
Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteRule ^Test$ http://www.mydomain.nl/contact [L,R=301] #OR #RewriteCond %{REQUEST_URI} /Test$ #RewriteRule (.*) /contact [S,L,R=301] RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC] RewriteRule .* - [F,L] RewriteRule ^(manager|assets) - [L] # For Friendly URLs RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Did that work?
RewriteRule ^article/$1\.html$ http://www.mydomain.com/example/article.html?start=$1 [L,R=301]
RewriteCond %{QUERY_STRING} ^p=company&l=nl$ [NC] RewriteRule ^page\.php$ http ://www.site.com/company? [R=301,NE,NC,L]
http://www.myurl.com/example/article.html?start=1
http://www.myurl.com/example/article/1.html
I just wannna redirect this url
http://www.myurl.com/example/article.html?start=1
to this
http://www.myurl.com/example/article/1.html
How?
RewriteRule ^article/([^/]*)\.html$ /article.html?start=$1 [L]
Hi mcweone,
I tried mrhaw's code and nothing redirected.
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /article\.html\?start=([^/]+) RewriteRule ^article/([^/]*)\.html$ /article.html?start=$1 [R=301,L]
RewriteCond %{QUERY_STRING} ^(.*)start=(.*)$ RewriteRule ^article.html$ /article/%2.html? [L,R=301]