plodos Posted November 13, 2008 Share Posted November 13, 2008 I have 3 differents ugly links. http://www.aaa.com/aaa.php?page=2 http://www.aaa.com/bbb.php?page=45 http://www.aaa.com/cccc.php?page=78 I want to convert these links pretty URLs. .htaccess Options +FollowSymLinks RewriteEngine on RewriteRule (.*)/(.*).html /aaa.php?page=$1 RewriteRule (.*)/(.*).html /bbb.php?page=$1 RewriteRule (.*)/(.*).html /cccc.php?page=$1 this is my pagination code link for ugly links echo "<a href=\"aaa.php?page=$next\">Next >></a></b></p>"; echo "<a href=\"bbb.php?page=$next\">Next >></a></b></p>"; echo "<a href=\"cccc.php?page=$next\">Next >></a></b></p>"; I want to convert these links to pretty links. what must I write for this? These are not working :s <a href="/?<?php echo $next; ?>/?<?php echo $aaa; ?>.html"></a> <a href="/?<?php echo $next; ?>/?<?php echo $bbb; ?>.html"></a> <a href="/?<?php echo $next; ?>/?<?php echo $cccc; ?>.html"></a> pls help me to how to convert? or Could you give me new .htaccess file with pretty URLs? Link to comment https://forums.phpfreaks.com/topic/132513-how-to-convert-ugly-urls-to-pretty-urls-mod-writenoob-question/ Share on other sites More sharing options...
flyhoney Posted November 13, 2008 Share Posted November 13, 2008 What you do want the pretty urls to look like? I think (untested), the following will forward ANYTHING.html to aaa.php?page=ANYTHING RewriteEngine on RewriteRule ^(.*)\.html$ aaa.php?page=$1 Link to comment https://forums.phpfreaks.com/topic/132513-how-to-convert-ugly-urls-to-pretty-urls-mod-writenoob-question/#findComment-689067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.