February 3, 200917 yr Hi all, I'm trying to render pages and make links in PHP using a directory name instead of a x.php. For instance, the PHP description on Wikipedia URL is http://en.wikipedia.org/wiki/Php'>http://en.wikipedia.org/wiki/Php Any other page you go on tends to have the URL and linkage format: http://en.wikipedia.org/wiki/[Title Name with underscores between seperated words] Does anyone know how this is achieved or what name/words I should be using in looking for a tutorial?
February 3, 200917 yr I'm not too sure I follow. Are you saying that you have directories on your server with pages in you want the links to go to, and that you want to make links that go to them? I'm abit puzzled, any chance you can explain again?
February 3, 200917 yr Author Sorry, I meant rather than have your homepage as 'index.php' and links pointing to it as <a href="index.php">, you could change the URL so that it could be index/ that is your homepage and <a href="index/"> for any links pointing to it. I think I've found it though. It's known as "Re-writing the URL" and it can be done using mod_rewrite in Apache. http://www.sitepoint.com/article/guide-url-rewriting/2/
February 3, 200917 yr Sorry, I meant rather than have your homepage as 'index.php' and links pointing to it as <a href="index.php">, you could change the URL so that it could be index/ that is your homepage and <a href="index/"> for any links pointing to it. I think I've found it though. It's known as "Re-writing the URL" and it can be done using mod_rewrite in Apache. http://www.sitepoint.com/article/guide-url-rewriting/2/ Yeah you found it. Quite nice for SEO purposes and just looks a lot "cleaner".
Create an account or sign in to comment