php - Vanity URL not working -
i using htaccess try , rewrite url. have tried 10 versions of code , examples nothing makes change. know mod_rewrite working because adding www url, vanity url won't work.
rewriterule ^franchise/([0-9]+)/?$ franchise-information.php?franchiseid=$1 [nc,l] # handle product requests
here .htaccess file:
<ifmodule mod_rewrite.c> rewriteengine on rewritecond %{https} !=on rewritecond %{http_host} !^www\..+$ [nc] rewriterule ^ http://www.%{http_host}%{request_uri} [r=301,l] rewriterule ^franchise/([0-9]*?)/$ franchise-information.php?franchiseid=$1 [nc,l] </ifmodule>
and here url:
http://www.playballkids.com/franchise-information.php?franchiseid=162
you can use code in document_root/.htaccess
file:
options -multiviews rewriteengine on rewritebase / rewritecond %{the_request} /franchise-information\.php\?franchiseid=([^\s&]+) [nc] rewriterule ^ franchise/%1? [r=302,l,ne] rewriterule ^franchise/(\d+)/?$ franchise-information.php?franchiseid=$1 [nc,l,qsa]
Comments
Post a Comment