homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Create apache rewrite rule dynamically

10+ Year Member

Msg#: 4681640 posted 2:18 am on Jun 21, 2014 (gmt 0)

Dear All

We want to use apache rule for dynamic / CMS based website

we want

myweb.com/myname001 to direct to myweb.com/abcd.php?id=100
myweb.com/myname002 to direct to myweb.com/abcd.php?id=200
myweb.com/myname003 to direct to myweb.com/abcd.php?id=300

All these entried are from table mtable in database

An user can add more records / entries to mtable how do i generate the apache rule in that case



WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4681640 posted 6:25 am on Jun 21, 2014 (gmt 0)

How do you get from 001 to 100, 002 to 200 and so on? Will it always be a mirror-image reversal from one to the other? Or is there some other pattern?

It looks as if what you want is a simple capture and reuse. But before we go any further we need to figure out exactly what you're doing. You don't really want to redirect from a short-and-simple URL such as "myname001" to a longer and uglier URL such as "abcd.php?id=100" do you? I tend to suspect that what you really want to do is rewrite: when the URL says such-and-such, quietly serve content from somewhere else.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved