htaccess

Reply

Join Date: May 2007
Posts: 11
Reputation: apwade is an unknown quantity at this point 
Solved Threads: 0
apwade apwade is offline Offline
Newbie Poster

htaccess

 
0
  #1
Oct 15th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 20
Reputation: omesa is an unknown quantity at this point 
Solved Threads: 0
omesa omesa is offline Offline
Newbie Poster

Re: htaccess

 
0
  #2
Oct 15th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 60
Reputation: RoryGren is an unknown quantity at this point 
Solved Threads: 8
RoryGren's Avatar
RoryGren RoryGren is offline Offline
Junior Poster in Training

Re: htaccess

 
0
  #3
Oct 16th, 2007
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-)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum


Views: 753 | Replies: 2
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC