| | |
htaccess
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2007
Posts: 11
Reputation:
Solved Threads: 0
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
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
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-)
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-)
![]() |
Similar Threads
- Disable access to .htaccess (Linux Servers and Apache)
- .htaccess not working.! (Linux Servers and Apache)
- .htaccess mod_rewrite problem (Linux Servers and Apache)
Other Threads in the PHP Forum
- Previous Thread: PHP gurus: Technology in PHP that has same capability of google book.
- Next Thread: how to call Stored Procedure in mysql by php
Views: 753 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code compression cron curl database date directory display download dropdown dynamic echo email error file files folder form forms function functions google href htaccess html httppost image include insert integration ip java javascript joomla limit link login loop mail md5 menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search secure select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video votedown web xml youtube





