I am trying to redirect a directory and all pages e.g. /shops/merchant1.htm to a generic file generic.htm using htaccess, does any have any ideas how to do this?

Also the generic.htm contains php.

I currently have hundreds of shops each with its own htm page, but i really want one generic.htm page that will cover all the shops, but driven by php and a mysql database. This would save dramatically on admin work generating a new page for each new merchant when it could be driven by one page reading the url address to modify the page to suit the new merchant.

Cheers,

Andrew

I have done this but using cpanel on my web hosts(going to the redirect link and/or page on the cpanel of the web host), i think it could be done, given time

Hi there

Lots of results from Google for general redirects.

Inside your .htaccess file -
Redirect 301 /oldpage.html http://www.target.com/newpage.html

or using meta tags in your page header:
<meta http-equiv="refresh" content="2;url=http://target.com">

Just an aside - you mention that your generic.htm contains php? You do realise that it must then be called generic.php in order for the php interpreter to pick it up?

Hope this helps. 8-)