Search
Generic filters
Exact matches only

Rewrite Rule – If Contains in URL Redirect

18th February 2014

Windows

windows-codehaven

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

If you have www.codehaven.co.uk/houses567
Becomes: – www.codehaven.co.uk/myhousespage567 (adds ‘ad_id=web“whatever” to the URL)

Was this code snippet helpful?

Comment on this Code Snippet?