ZackY Posted July 21, 2013 Share Posted July 21, 2013 Hello All, Well I am new to this forum and just came to get the answer of one question. :cool: I am working on building one PHP based site and have to add one feature to it. But I am not sure how I can achieve this. May be any of you can help me. Thanks in advance, here's the thing I wanna achieve:- My site has total 2 pages. On one page there is one form where user will enter one "ID" for ex. "ID1234", as soon as he entered this, the whole site [of 2 pages] must be duplicated with this new ID used in domain. Ex. If my site name is "www . mywebsite . com", then a duplicated site must have this kind of link "www . mywebsite . com/ID1234" or "www . mywebsite . com/?R=ID1234". I have to urgently make this thing work out. All the responses will be appretiated. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/280372-need-help-in-creating-run-time-php-pages/ Share on other sites More sharing options...
requinix Posted July 21, 2013 Share Posted July 21, 2013 (edited) Apparently you don't mean actually duplicating a website but duplicating a particular page. The thing you need is "URL rewriting". What you do is tell your web server that requests for "/ID1234" (or anything matching that kind of pattern) instead get internally rewritten to "/index.php?R=ID1234". Nothing actually gets duplicated, you still have just the one file, and the user is none the wiser. What are these ID things and what kinds of values do they have? Do they all fit the pattern "IDnnnn..."? Do you know that your "?R=ID1234" option can work right now without any of this URL rewriting stuff? Edited July 21, 2013 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/280372-need-help-in-creating-run-time-php-pages/#findComment-1441586 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.