1
ewonline
SEO URLs for News Module
  • 2006/10/5 4:48

  • ewonline

  • Not too shy to talk

  • Posts: 198

  • Since: 2004/11/17


I managed to hack up the XOOPS news module so I have SEO URLs
Like:
http://www.ewonline.net/news/688-october-calendar-wallpapers/

Anyhow, I was wondering if anyone knows whether or not long file or in this case directory names are bad for search engines?

Also, anyone here good with mod_rewrite?
How would I map the index file in /news/ to /modules/news/index.php?
Resized Image

2
wizanda
Re: SEO URLs for News Module
  • 2006/10/5 7:27

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Yeh it does...
I think and estimate 42 many places say 80, yet considering if you look at google results and how much of a title they use in any case...use that as your guide lines to what will work as you see.

3
FaYsSaL
Re: SEO URLs for News Module
  • 2006/10/5 11:49

  • FaYsSaL

  • Not too shy to talk

  • Posts: 115

  • Since: 2006/1/2 2


i dont think !
hmmm im not sure but i've seen some website that have looooooong and they are in the first positions!

4
FaYsSaL
Re: SEO URLs for News Module
  • 2006/10/5 21:15

  • FaYsSaL

  • Not too shy to talk

  • Posts: 115

  • Since: 2006/1/2 2


can i know how have u done this !
(that what i was looking for)

5
ewonline
Re: SEO URLs for News Module
  • 2006/10/5 21:44

  • ewonline

  • Not too shy to talk

  • Posts: 198

  • Since: 2004/11/17


I'm hesitant to release the code at this time due to security concerns, but I will definitely do so in the future after I get it all settled.
Resized Image

6
martyboy
Re: SEO URLs for News Module
  • 2006/10/5 22:01

  • martyboy

  • Quite a regular

  • Posts: 256

  • Since: 2004/5/25


Thats a very nice URL hack you have, i would definatley be interested in using this once you are happy to release the code, I also notice that you dont have /modules/ that is very cool.

Im not sure how search engines react to the long urls but alot of blogs like b2evolution use similar url's which contain the post title doesnt seem to do any harm.

I curently use the news titles hack by herve and its improved my news pages rankings I think your url hack would comliment this perfectly.
Michael Jackson = King Of Pop

Xoops = King Of CMS

7
ewonline
Re: SEO URLs for News Module
  • 2006/10/5 22:15

  • ewonline

  • Not too shy to talk

  • Posts: 198

  • Since: 2004/11/17


Its actually fairly easy. If you know some php, its very easy.

Create a folder called news
.htaccess
RewriteEngine on
RewriteRule 
^([0-9]*)/ /path/to/news/module/index.php?start=$[L]
RewriteRule ^([0-9]*)-(.*)/ /path/to/article.php?storyid=$[L]


So, thats the mod rewrite rules. That will help you out if you dont understand mod rewrite.
Now, like I said, I'm not going to immediately release the php code I use due to security concerns, but I will give you the code that will put you half way there.

$story['title'] = "<a href="".XOOPS_URL."/news/".$sarray[$i]->storyid()."-".$storytitle."/">".$sarray[$i]->title()."</a>";

$storytitle strtolower($sarray[$i]->title());
$storytitle str_replace(" ""-"$storytitle);
$storytitle ereg_replace("[^[:alnum:]-]"""$storytitle);


If you don't know php, dont try this.
Resized Image

8
FaYsSaL
Re: SEO URLs for News Module
  • 2006/10/5 23:16

  • FaYsSaL

  • Not too shy to talk

  • Posts: 115

  • Since: 2006/1/2 2


im waiting for the code release
thx ewonline

9
FaYsSaL
Re: SEO URLs for News Module
  • 2006/10/10 1:10

  • FaYsSaL

  • Not too shy to talk

  • Posts: 115

  • Since: 2006/1/2 2


can anyone tell me how can i do something similar to this !
the author doesnt seem be back here! :-s

thx in advance!

10
ewonline
Re: SEO URLs for News Module
  • 2006/10/24 2:45

  • ewonline

  • Not too shy to talk

  • Posts: 198

  • Since: 2004/11/17


I'll release this once I upgrade my site to XOOPS 2.0.15 and can confirm that it works with that.

Note, if you want to try it (and for those who PM'ed me), all the code thats really needed is posted above. Some knowledge of PHP is needed.
Resized Image

Login

Who's Online

192 user(s) are online (111 user(s) are browsing Support Forums)


Members: 0


Guests: 192


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits