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? Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.