Hi,
I have a php site in which different pages are called by a url like:
Code:
www.mysite.com/dir/index.php?p=21&x=12345679
There may or may not be a number of other paramaters after the p paramater
Temporarily I want to redirect a number of those pages to another site so that for example
Code:
index.php?p=21 goes to www.myothersite.com/index.html
index.php?p=26 goes to www.myothersite.com/index.html
index.php?p=28 goes to www.myothersite.com/index.html
So I have tried to set a .htaccess file containing the following
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^dir\/index\.php\?p=2[168].*$ http://www.myothersite.com/index.html [L,R=302]
But this gives a 500 (internal server) error
I am not very familiar with either mod_rewrite or regexes so I cannot see what I am doing wrong. Can anyone point out the errors.
Thank you
Richard