How can I make a dynamic folder structure, for folders that don't exist? ie, I want to make: www.mywebsite.com/billy www.mywebsite.com/sally www.mywebsite.com/bob etc (for a million other dynamic names) But I want every one of those urls to display the same content (that I will derive from an include). How can I do the above? I can't think of a way.
I don't understand exactly what you're trying to accomplish. You would need a Rewrite Rule in an htaccess file (provided you're server is running Apache with mod_rewrite). That would have to be something like: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z])+$ test.php [L] Code (markup): You'd have to be careful if they all had the exact same content. You would need to specify either in a robots.txt file or meta robots tag that you don't want search engines to spider and index the pages, else you will be punished for duplicate content.
Ok, I will explain better: I have this include: /inc/username-info.php In that include, I will set variables for the username. Then, I will create a file: /inc/display.php This will use all the info that "username-info.php" contains. To get a page to know what username to use, I am not going to us: www.mywebsite.com/index.php?id=name I am going to use: www.mywebsite.com/username However, the folder "username" doesn't actually exist. It is dynamic. So, if someone goes to www.mywebsite.com/username, I want to display a page that conntains the paramaters I have set in the inc folder (for that username). How can I make a dynamic folder structure, for folders that don't exist? ie, I want to make: www.mywebsite.com/billy www.mywebsite.com/sally www.mywebsite.com/bob etc (for a million other dynamic names) But I want every one of those urls to display the same content (that I will derive from an include). How can I do the above? I can't think of a way. P.S. I don't want them to redirect. So I think I might have to use a url rewrite? ..and then have the particular information displayed, according to the username that was entered?