SEO Job URL-Check
This code will only be used in few situations, but will make sure search engines won't index double content at job pages. The difference in the URL between the page description pages and all others is that they rely on the ID within the URL, instead of the the title in the URL.
Basically "jobberbase.com/job/11/a-sample-job" works just as well as "jobberbase.com/job/11". In most cases this wouldn't matter, but in the following cases a different URL could appear:
- You edit the job title later when it's already indexed. Search engines will see it as a new page but are also still able to see the old (thus concluding it's double content).
- You don't have enough room to post a full URL and want to shorten it (like the twitter script of MPLOYR.com)
- Someone makes a typo in the url and posts it somewhere (which google will find eventually)
Modification Features:
All this modification does is compare the url with what it should be and if they aren't the same it 301 redirects (permanent redirect). That way the search engine replaces its known version with the proper one.
1. Open /page_job.php
Find:
$url = BASE_URL . URL_JOB . $id . '/' . $info['url_title'] . '/';
Or if you don't use the Dynamic URL Structure Mod:
$url = BASE_URL . 'job/' . $id . '/' . $info['url_title'] . '/';
If you use the "Dynamic URL Structure Mod" - Replace with:
$url = BASE_URL . URL_JOB .'/' . $id . '/' . $info['url_title']; $current_url = 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; if ($current_url != $url) redirect_to($url, 301);
If you don't use the "Dynamic URL Structure Mod" - Replace with:
$url = BASE_URL . 'job/' . $id . '/' . $info['url_title']; $current_url = 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; if ($current_url != $url) redirect_to($url, 301);
Note that for the redirect function to work correctly you need jobberbase 1.6 or the redirect modification posted on the forum.






July 4th, 2009 - 23:53
Great web site. Solid, helpful advice that you can benefit from and for free, it does not get much better than that. The web needs more sites like this one, please keep it up.
July 20th, 2009 - 02:09
I don’t know if it works (I can’t verify it) I’ve got this code
$current_url = substr_replace(BASE_URL ,”",-1).$_SERVER["REQUEST_URI"];
if ($url != $current_url) redirect_to($url, 301);
below your code
$url = BASE_URL . URL_JOB .’/’ . $id . ‘/’ . $info['url_title'];
$current_url = ‘http://’ . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if ($current_url != $url) redirect_to($url, 301);
Is this okay? Thanks
July 20th, 2009 - 23:55
It’s quite simple to check really. You’ll only have to remove part of the URL and see if it redirects to the proper URL. If it does this, it works!
July 21st, 2009 - 13:11
I receive this error when I visit ( http://jobs.careertalk.in/job/14/testing-new-jobs-at-slite-web-media )
Notice: Use of undefined constant URL_JOB – assumed ‘URL_JOB’ in /home/navjot/public_html/jobs/page_job.php on line 62
Warning: Cannot modify header information – headers already sent by (output started at /home/navjot/public_html/jobs/page_job.php:62) in /home/navjot/public_html/jobs/_includes/function.redirect_to.php on line 26
Warning: Cannot modify header information – headers already sent by (output started at /home/navjot/public_html/jobs/page_job.php:62) in /home/navjot/public_html/jobs/_includes/function.redirect_to.php on line 27
July 21st, 2009 - 13:40
I’ve updated the mod, the script assumed the user already installed the Dynamic URL Modification. Choose the version that fits for you, let me know if it works.