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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -