ServWise.com Posted March 6, 2009 Share Posted March 6, 2009 For those of you who like me are a bit SEO fanatic here are a few small rewrite rules for WHMCS that allow you to use language folders for separating your different language sites allowing spiders to index all of your content in all languages. These rules basically append language=[langname] to all URLs based on the language sub-folder making sure that all pages can be indexed by the spiders. Don't forget to change language=English to the language you want to force (e.g. language=French or language=German etc) Two examples below #English RewriteRule ^en/(.*).php?(.*)#(.*) /whmcs/$1.php?$2&language=English#$3 [NC,LP,QSA] RewriteRule ^en/(.*).php?(.*) /whmcs/$1.php?$2&language=English [NC,LP,QSA] RewriteRule ^en/(.*)#(.*) /whmcs/$1?language=English#$2 [NC,LP,QSA] RewriteRule ^en/(.*) /whmcs/$1?language=English [NC,LP,QSA] #italiano RewriteRule ^it/(.*).php?(.*)#(.*) /whmcs/$1.php?$2&language=Italian#$3 [NC,LP,QSA] RewriteRule ^it/(.*)?(.*) /whmcs/$1?$2&language=Italian [NC,LP,QSA] RewriteRule ^it/(.*)#(.*) /whmcs/$1?language=Italian#$2 [NC,LP,QSA] RewriteRule ^it/(.*) /whmcs/$1?language=Italian [NC,LP,QSA] Maybe this can be put into the tips and tricks forum, I don't seem to have access to post to there though. 0 Quote Link to comment Share on other sites More sharing options...
ServWise.com Posted March 6, 2009 Author Share Posted March 6, 2009 -- Update -- For this to work in the default tempates you need to remove the <base> tag from the header and remove any {$smarty.server.PHP_SELF} tags. 0 Quote Link to comment Share on other sites More sharing options...
ServWise.com Posted March 7, 2009 Author Share Posted March 7, 2009 -- Update 2 -- Instead of the above action an easy way is to add the following code to the top of your header.tpl (replace "whmcs" with your own folder where you have installed whmcs.) {php} $path = $_SERVER['REQUEST_URI']; $urlarray = explode("/", $path); $_SERVER['PHP_SELF']=str_replace("whmcs",$urlarray[1],$_SERVER['PHP_SELF']); {/php} Incidentally, this only works if you have your whmcs installed in a sub-folder of root. If you have it installed in the root then use the following script instead (Untested) {php} $path = $_SERVER['REQUEST_URI']; $urlarray = explode("/", $path); $_SERVER['PHP_SELF'] = "/" . $urlarray[1] . $_SERVER['PHP_SELF']; {/php} 0 Quote Link to comment Share on other sites More sharing options...
RoadStar Posted January 16, 2011 Share Posted January 16, 2011 ServeWise or anyone in this forum figured out a way for mod rewrite rules to work with products and services? As it is now no matter what product page you're on title page is identical on all. Needless to say this is a disaster for SEO Thanks 0 Quote Link to comment Share on other sites More sharing options...
wilmatan Posted May 7, 2011 Share Posted May 7, 2011 ServeWise or anyone in this forum figured out a way for mod rewrite rules to work with products and services?As it is now no matter what product page you're on title page is identical on all. Needless to say this is a disaster for SEO Thanks I don't quite understand your question. Can you please elaborate it? 0 Quote Link to comment Share on other sites More sharing options...
Anders Posted July 8, 2011 Share Posted July 8, 2011 thx for great ide is it possible to see if it works on my own site? 0 Quote Link to comment Share on other sites More sharing options...
Manchester Web Hosting Posted July 17, 2011 Share Posted July 17, 2011 ServeWise or anyone in this forum figured out a way for mod rewrite rules to work with products and services?As it is now no matter what product page you're on title page is identical on all. Needless to say this is a disaster for SEO Thanks Yeah, you'll be hitting duplicate content issues here. The title tags do need to be unique... 0 Quote Link to comment Share on other sites More sharing options...
sebsimappus Posted January 10, 2018 Share Posted January 10, 2018 Hello,Would it be possible to get an update for WHMCS v7thank you in advance 0 Quote Link to comment 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.