Used in WordPress, but can be used in other .htaccess files
301 ReWrite rules
Standard ReWrite Rule that adds on to the URL
If you have www.codehaven.co.uk/houses
Becomes: – www.codehaven.co.uk/myhousespage and adds ‘ad_id=web123’ to the URL
1 2 3 |
RewriteRule ^houses[/]?$ /myhousespage?ad_id=web123 [NC,R=301,L] |
If you have www.codehaven.co.uk/houses567
Becomes: – www.codehaven.co.uk/myhousespage567 (adds ‘ad_id=web“whatever” to the URL)
1 2 3 |
ReWriteRule ^houses[/]?([a-z0-9]*) /myhousespage?ad_id=$1 [NC,R=301,L] |