mesh2005 Posted January 14, 2008 Share Posted January 14, 2008 I'm building a website, currently I have a web page www.domain.com/view.php?id=id, I'm asked to replace this with a page on the form www.domain.com/name , is this something I can do with PHP? or does it need some mod_rewrite rules? or both? Link to comment https://forums.phpfreaks.com/topic/85920-how-can-i-make-links-like-wwwdomaincomname/ Share on other sites More sharing options...
dooper3 Posted January 14, 2008 Share Posted January 14, 2008 It only needs mod_rewrite rules. Just google them and then use the php as normal (i.e. as if it were the original address, not the modified one). Link to comment https://forums.phpfreaks.com/topic/85920-how-can-i-make-links-like-wwwdomaincomname/#findComment-438661 Share on other sites More sharing options...
mesh2005 Posted January 14, 2008 Author Share Posted January 14, 2008 Thank you, I found a rewrite rule that some people claim to be working but unfortunately it is not on my machine: RewriteEngine On RewriteRule art/(.+) art.php?name=$1 This goes to art.php but the GET variable is always empty Any idea? Link to comment https://forums.phpfreaks.com/topic/85920-how-can-i-make-links-like-wwwdomaincomname/#findComment-438697 Share on other sites More sharing options...
dooper3 Posted January 14, 2008 Share Posted January 14, 2008 I just replied to this on your other topic under server management. Link to comment https://forums.phpfreaks.com/topic/85920-how-can-i-make-links-like-wwwdomaincomname/#findComment-438714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.