Forum Moderators: phranque
Say im running a lyrics site for example...
How would you create the index page (for example: www.mydomain.com/lyrics/r/rolling_stones/index.html) for every artist, (there are over 3000 artists) that will list all the available lyrics by this artist...
(all the actual lyric files within each artist directory are done, and look like this for example: www.mydomain.com/lyrics/r/rolling_stones/paint_it_black.html)
What is the best way to go about doing this?
Right now in each artist directory, it just lists all the files, and this is basically what i want, but it doesn't have my web design or logo, just the apache index file.
I just need to know how to automatically create the index files for www.mydomain.com/lyrics/r/artist/ that will list all the lyrics by that artist.
I would do something like
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule (.*)/(.*)/(.*)/index.htm$ /index_template\.php?artist_id=$3 [L]
By no means is the above correct but if you know a little php then you can create a database of all your content then use mod_rewrite under apache to generate index files for each directory.
[edited by: lasko at 6:11 am (utc) on June 1, 2004]
I have converted several spreadsheets to web pages this way. You can put the url in the anchor fields as both the target and as the displayed text.
How to create the spreadsheet depends upon what other sofware you are using. Generally, if you can get the index into a text or word processing document with returns at the end of each entry, you can cut and past into excel, resulting in a row for each entry.