A SEO Module

A SEO Module

by Jai Gupta -
Number of replies: 10
I want to create a module which can help in SEO.

i have created a part of it and is working in my new website http://dcecampus.com/

i have used mod_rewrite to chnage moodles urls into something which looks better to search engines, i have also replaced the word 'mod' with my keyword.

i am also looking forward to change or use database module for auto linking
see http://moodle.org/mod/forum/discuss.php?d=59938

i want your suggestions/comments on this.
Average of ratings: -
In reply to Jai Gupta

Re: A SEO Module

by Pablo Etcheverry -
Picture of Core developers
Please, could you clarify the acronym? Many non english-speaking people here...
TIA,
Pablo

P.S. Could it be Search Engine Optimization?
In reply to Pablo Etcheverry

Re: A SEO Module

by Jai Gupta -
sorry about that... i am new here!

yes it is Search Engine Optimization.
In reply to Jai Gupta

Re: A SEO Module

by Thomas Aldenhoven -
Hi,
I'm about to try some actions, which would translate the original moodle-links into SEO links, too.
I have not yet started, because I had to do some work on my forum first.
When I enter your given site, I can't see any rewriting on moodle's URLs.

As far as I know, you can use mod_rewrite internally, but have to do all the work internally in the php-files given by moodle, and additionally in a robots.txt to prevent google or other search engines from hitting the same page from several URLs.
I would like to mail you for some further discussion, so we won't probably have to invent the same wheel twice.
Best regards
Thomas
In reply to Thomas Aldenhoven

Re: A SEO Module

by Jai Gupta -
my email is mail@jaigupta.com, you can contact me there.
In reply to Thomas Aldenhoven

Re: A SEO Module

by Jai Gupta -
hello thomas,

good it see some more people who are sailing in the same boat.

i was able to re-write basic urls of Moodle but due to the fact that Moodle upgrades itself so frequently i am unable to make changes so fast.

i have no other option other then to hope that a developer of Moodle will think about SEO.

i would like to share my work with you... but unfortunately i have lost a big part of it sad due to a data lost.

changes to .htaccess

RewriteEngine On
RewriteRule ([^/]+)/resource/view/([0-9]+) /$1/resource/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/forum/view/index.php(.*) /$1/forum/index.php$2 [skip=20] [NS]
RewriteRule ([^/]+)/forum/view/([0-9]+) /$1/forum/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/forum/discuss/([0-9]+) /$1/forum/discuss.php?d=$2 [skip=20] [NS]
RewriteRule ([^/]+)/chat/view/([0-9]+) /$1/chat/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/wiki/view/([0-9]+) /$1/wiki/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/category/([0-9]+) /$1/category.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/category/index.php /$1/index.php [skip=20] [NS]
RewriteRule ([^/]+)/category/view/([0-9]+) /$1/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/view/([0-9]+) /$1/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/assignment/view/([0-9]+) /$1/assignment/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/choice/view/([0-9]+) /$1/choice/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/data/view/([0-9]+) /$1/data/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/glossary/view/([0-9]+) /$1/glossary/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/hotpot/view/([0-9]+) /$1/hotpot/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/quiz/view/([0-9]+) /$1/quiz/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/scorm/view/([0-9]+) /$1/scorm/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/survey/view/([0-9]+) /$1/survey/view.php?id=$2 [skip=20] [NS]
RewriteRule ([^/]+)/workshop/view/([0-9]+) /$1/workshop/view.php?id=$2 [skip=20] [NS]
RewriteRule ^forum/(.*) /mod/forum/$1

i had also changed many Moodle files which were responsible to show urls in Moodle.
In reply to Jai Gupta

Re: A SEO Module

by jamie j -

Hello Jai

Good work dear

i would like to share my work with you... but unfortunately i have lost a big part of it sad due to a data lost.

Are you using this module in your website dcecampus?

your urls are clean as expected , am looking to hear more from your side

thanks for this great effort smile

In reply to Jai Gupta

Re: A SEO Module

by Guilherme Oliveira Dutra -
Hi Jai Gupta,

I was wondering how start a SEO Module. You did a great job with .htaccess.

Do you know which other php files I have change?

All people are invited to help in this module.

Thanks in advance.

Guilherme.


In reply to Jai Gupta

Re: A SEO Module

by Steve Bilton -
Hello Jai,

I have been looking in to your .htaccess mod re writes rules, I visited your website http://dcecampus.com and found that all your links are broken on the home page. for example http://dcecampus.com/dce-elearning/forum/view/12 should this not be something like :-
" http://www.sheilds-elearning.co.uk/mod/forum/view.php?id=2 "

I realise you have re-written these links (probably in .htaccess) but to make you aware they all lead to an error page.

Steve