| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 118581 | 2011-06-12 08:23:00 | Web Design question - coding | Renmoo (66) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 1208534 | 2011-06-12 08:23:00 | Hey all, I am trying to create the following, in which when the user types: www.domainname.com The "uniqueinformationgoeshere" bit will be copied and pasted into a text field in a index.php document that is stored in the root directory. How do I do that? Cheers :) |
Renmoo (66) | ||
| 1208535 | 2011-06-12 09:01:00 | Could do it with URL rewriting, passing the "unique text" to index.php. | inphinity (7274) | ||
| 1208536 | 2011-06-12 09:04:00 | Hmmmm, explain a bit more? :) | Renmoo (66) | ||
| 1208537 | 2011-06-12 09:33:00 | Use www.iwebtool.com to generate a .htaccess file which can be used to configure URL rewriting. | somebody (208) | ||
| 1208538 | 2011-06-12 09:42:00 | Right. After generating the .htaccess file, how do I go about retrieving the URL and insert it into the textfield? | Renmoo (66) | ||
| 1208539 | 2011-06-12 10:28:00 | Your index.php file will need to take the argument (for example, blah=myfunnything) and insert it into the input field's value. | somebody (208) | ||
| 1208540 | 2011-06-12 12:02:00 | I just realised that I omitted a crucial information: The part where it says "uniqueinformationgoeshere" of the link www.domainname.com is generated dynamically (i.e. it is different every time). In other words, there isn't a set "uniqueinformationgoeshere" that I can enter at the end of the domain name in the .htaccess URL rewrite Enter Dynamic URL textfield. |
Renmoo (66) | ||
| 1208541 | 2011-06-12 20:43:00 | If it *had* to be /uniqueinformationgoeshere as opposed to /index.php?i=uniqueinformationgoeshere then I'd be outta ideas, but if not, then perhaps this might be of use: www.w3schools.com |
Chilling_Silence (9) | ||
| 1208542 | 2011-06-13 01:37:00 | You can use url rewriting with a regex to pass /anyrandomvalue to index.php. | inphinity (7274) | ||
| 1208543 | 2011-06-13 07:47:00 | I *think* (and haven't test this) that the following .htaccess might do the trick - at least it's a starting point to think about: Options +FollowSymLinks RewriteEngine on RewriteRule /([a-zA-Z]*) index.php?blah=$1 Then you would need some PHP code to retrieve the "blah" variable and stick the value into the text box. |
somebody (208) | ||
| 1 2 | |||||