1

when I digit this url:

http://www.mydomain/search.php?page=1&order=ASC&contract=rent&new=

url should redirect to

http://www.mydomain/rent/1

I try to add this line in my .htaccess, without success:

Redirect http://www.mydomain/search.php?page=1&order=ASC&contract=rent&new= http://www.mydomain/rent/1

thanks in advance!!!

1 Answer 1

1

Add these lines instead (but you'll only need to add the first line if it isn't there already):

RewriteEngine On
RewriteCond %{QUERY_STRING} ^page=(\d+)&order=ASC&contract=rent&new=$
RewriteRule search.php /rent/%1? [L,R=301]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.