|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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
__________________
Discount shopping vouchers |
|
|||
|
I am surprised nobody knows the answer to this question I am sure loads of sites would require this sort of functionality.
It is possible by using mod rewrite and has saved me loads of admin work on my website.
__________________
Discount shopping vouchers |
|
||||
|
Yes it is possible using a 301 Redirect and here is sample code to accomplish this scenario.
redirect 301 /test http://www.your-website-url-comes-here.com Put this code in your .htaccess file and put this file in your website's root folder. Now, whenever someone will try to open http://www.your-website-url-comes-here.com/test/ or any file in test folder then it will redirect the borswer to http://www.your-website-url-comes-here.com Sincerely, Ajay Chadha (Director) Chadha Software Technologies
__________________
PHPKB Knowledge Base Script, Custom Toolbar Development, Search Scripts Directory |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| .htaccess commands | apwade | Web Programming Discussion Forum | 6 | 08-15-2007 03:45 PM |
| .htaccess troubles. | Sub Rosa | Internet Security Discussion Forum | 3 | 06-22-2007 06:32 PM |
| .htaccess a lot simpler | HostEBiz | Search Engine Optimization Forum | 0 | 08-15-2006 08:22 AM |
| What is .htaccess and how does it work? | complete | Web Programming Discussion Forum | 1 | 01-02-2006 07:40 AM |
| .htaccess question | jestep | Web Programming Discussion Forum | 2 | 06-09-2005 01:07 PM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |