Hi, I have been trying a lot of different things to get around this problem: I have a url that looks like this: www.domain.com/name/index.php.... and I want to write a script that will pick the "name" part out of the url and then check that name against a database, lastly it will display information of that name from the database. Another tricky detail is that its not a fixed name, there will be hundreds of names with more added all the time so it needs to do a string search to grab the name. If anyone can even give me some links to code that will actually work for me (like how to get the FULL url) and so on that would be great. Any help is appreciated, thanks
Hi, Its called URL Rewriting. You need to setup .htaccess file in your / directory. sample content of the .htaccess for that purpose is: Options +FollowSymLinks RewriteEngine On RewriteRule ^([0-9]+)$ /$1/ [R] RewriteRule ^([0-9]+)/$ index.php?name=$1 Code (markup): Let me know if your still not able to do it. Cheers!
ok thanks, so what would this actually do? my interpretation is that it will add the variable name with a value of $1 ?? sorry, i don't quite understand. could you please explain what those 2 rules are doing? Thanks