php - Creating SEO URLs with slug and .htaccess -
i trying create seo urls php mysql , .htaccess.
here php code:
echo '<li>'.$icon.' <a href=\'software.php?pid='.softid.''.$slug.'\'>'.$title.'</a></li>';
the url base_url/software-name-etc
.
<ifmodule mod_rewrite.c> rewriteengine on rewritebase /filemono-v2 rewriterule ^software-profile/([a-za-z0-9_]-)/([0-9]+)\.php$ software-profile.php?pid=$1 </ifmodule>
what’s wrong code? i’m getting 404.
you need change php code reflect rewrite rule matching against:
echo '<li>'.$icon.' <a href=\'/software-profile/'.$softid.'/'.$slug.'.php\'>'.$title.'</a></li>';
so anchor should /software-profile/pid/slug.php
Comments
Post a Comment