Guys,
I urgently want to change the way my URLS appear on my site using the books module.
At the moment - all my links have the format freebetguide.com/books-index-bkid-54.html
I would like to amend this to aid search engine optimisation.
Something like freebetguide.com/bookmakers-offers-mansion.htmlor (even better) freebetguide.com/mansion.html so instead of the bkid field, it would be using the name of the "book", in this case - mansion sportsbook, and also using the CID - (bookmakers).
Does anyone have any idea how this can be done?
http://www.freebetgu…-index-bkid-54.html
Mark
edited by: Cleverdick, Sep 03, 2006 - 04:19 PM
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Books Module Help (Will Pay if Needed)
-
- Rank: Team Member
- Registered: Feb 27, 2005
- Last visit: Apr 12, 2010
- Posts: 665
First you should upgrade your PN-site to 0.7.6.2 for security reasons.
For your question: you would have to edit the code of the Books module to:
1. include the title of the book in the URL and
2. maps a given title in the URL to lookup the correct bkid.
The latter is more difficult, and I would advise you to skip it. First go for freebetguide.com/books-index-bkid-54-title-mansion.html (adding the title to the URL, for your SEO) and afterwards hack the outputfilter / htaccess for shorturls to shorten this to freebetguide.com/books-54-mansion.html (which still leaves the bkid so you don't need to map the title to the bkid)
But, can it be done in a few steps? No, you would have to dive in the code and change it, or contact the module developer.
edited by: Teb, Sep 04, 2006 - 09:59 AM
--
-- Teb
-- Dutch Zikula Community
Support questions in a Personal Message will be ignored. Use the forums at all times! -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Nov 20, 2007
- Posts: 96
Hi Teb,
Thanks for the response.
I thought about un-installing the books module and re-installing under a different name, e.g. "offers" - hopefully this would replace the "books" in the URL.
As for everything else, I guess I will need expert assistance!!
I would like to know more about the "hack the outputfilter / htaccess for shorturls" ? How can I do this?
Mark -
- Rank: Team Member
- Registered: Feb 27, 2005
- Last visit: Apr 12, 2010
- Posts: 665
Cleverdick
I thought about un-installing the books module and re-installing under a different name, e.g. "offers" - hopefully this would replace the "books" in the URL.
There is no need to do that. And remember, if you do that, all your data will probably be lost...
Cleverdick
I would like to know more about the "hack the outputfilter / htaccess for shorturls" ? How can I do this?
You need to edit both the .htaccess file and the /modules/Xanthia/plugins/outputfilter.shorturls.php file. PHP knowledge and understanding regular expressions is needed for this.
Also take a look at http://community.postnuke.com/module-Forum-viewtopic-topic-46310.htm or do a forum search on outputfilter shorturls htaccess
--
-- Teb
-- Dutch Zikula Community
Support questions in a Personal Message will be ignored. Use the forums at all times! -
- Rank: Software Foundation
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 3814
Quote
I would like to amend this to aid search engine optimisation.
sidenote: in terms of SEO 'speaking urls' are IMHO one of your smaller problems. you should definitly work on some on-page optimization (markup, linkcount, title-attributes etc) prior to working on the URL-syntax.
--
regards from germany
..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::.. -
- Rank: Team Member
- Registered: Feb 27, 2005
- Last visit: Apr 12, 2010
- Posts: 665
Maybe http://www.google.com/search?q=SEO+guidelines+HTML+tags can show you some nice pages, or try http://del.icio.us/popular/seo
Point is to use heading tags within your pages, title and alt attributes in 'a' and 'img' tags, proper well-defined syntax, ...
--
-- Teb
-- Dutch Zikula Community
Support questions in a Personal Message will be ignored. Use the forums at all times! -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Nov 20, 2007
- Posts: 96
Just tried a HTML validator and got a million results failed..
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.freebetguide.com&charset=%28detect+automatically%29&doctype=Inline
Some of them I have no control over though, e.g.
Error Line 737 column 47: general entity "aff" not defined and no default entity.
....skybet.com/skybet?offer=20&aff=602">SkyBet - £20
The "aff" quoted here is the affiliate data for the site that I need... how do I get round this?
Also, Line 35 column 17: there is no attribute "LEFTMARGIN" - If I remove these my page looks stupid :(
Mark
Mark
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Further tips and answers to some of the validations issues you have
- &'s must be represented by the proper HTML entity &.
- HTML 4.01 transitional is the weakest doctype available and allows the use of many deprecated and not recommend tags e.g. font tags. I'd recommend at least HTML 4.01 strict.
- Use proper structural markup. i.e. tables for tabular data only, headers using proper header tags, paragraphs as paragraphs, lists as lists etc.
- Where possible avoid images containing solely text. Search engines can't read text in images and alt text won't be given the same weighting
All of these, along with the primary one of good content, are the basics to getting a site ranked well.
-Mark
--
Visit My homepage and Zikula themes. -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Nov 20, 2007
- Posts: 96
Hi Mark,
Cheers for the reply.. appreciate the help. By 'proper entity' do you mean the HTML code for $, e.g. & amp or whatever it is? Will this still be tracked for the website referral?
I know I am asking a lot, but if anyone has time to look at my site and start me off with a few specific suggestions it would be much appreciated :(
Mark -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Nov 20, 2007
- Posts: 96
Ok, I've read several threads on this and i'm sorry but I cant get my head around it.
Can people please leave their quotes (or PM) for amending the module to format such as freebetguide.com/mansion-free_580_bet-offer.html or whatever is possible please?
If not, any specific help would be VERY much appreciated.
Mark -
Unregistered
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 4294967287
OK. First upgrade to PN 0.762
Then do one of the two things below:
1. Without changing core files, the following will make 'books' change to 'offers':
- Go to /index.php?module=Modules&type=admin&letter=B
- Under 'Actions', click 'Edit', and name the module 'Offers'.
2. When changing core files, always document what you are doing, upgrades overwrite your hacks:
- Edit the file /modules/Xanthia/plugins/outputfilter.shorturls.php
- On top of the $in array, addand replace the ;) with ;)
Code
$prefix . 'index.php\?name=books"|',
$prefix . 'index.php\?name=books&(?:amp;)?file=index"|',
$prefix . 'index.php\?name=books&(?:amp;)?file=index&(?:amp;)?bkid=([\d]+)"|',
$prefix . 'index.php\?name=books&(?:amp;)?file=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?name=books&(?:amp;)?file=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?name=books&(?:amp;)?file=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?name=books&(?:amp;)?file=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?name=books&(?:amp;)?file=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"|',
- On top of the $out array, add
Code
'"Offers.'.$extension.'"',
'"Offers.'.$extension.'"',
'"Offers-id.'.$extension.'"',
'"Offers-.'.$extension.'"',
'"Offers---.'.$extension.'"',
'"Offers-----.'.$extension.'"',
'"Offers-------.'.$extension.'"',
'"Offers---------.'.$extension.'"',
- Then, edit .htaccess, and add
Code
RewriteRule ^Offers\.html$ index.php?name=books [L,NC,NS]
RewriteRule ^Offers-id([^-]+)\.html$ index.php?name=books&file=index&bkid= [L,NC,NS]
RewriteRule ^Offers-([^-]+)\.html$ index.php?name=books&file= [L,NC,NS]
RewriteRule ^Offers-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=books&file=&= [L,NC,NS]
RewriteRule ^Offers-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=books&file=&=&= [L,NC,NS]
RewriteRule ^Offers-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=books&file=&=&=&= [L,NC,NS]
RewriteRule ^Offers-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=books&file=&=&=&=&= [L,NC,NS]
Make sure you have backups, I did not test this and cannot guarantee it will work. -
- Rank: Team Member
- Registered: Feb 27, 2005
- Last visit: Apr 12, 2010
- Posts: 665
Damn, session expired...
Make sure you copy the codes *not* from this screen, but click on 'quote' and copy the text from the 'Quick Reply' area. SafeHTML is doing a good job here.
--
-- Teb
-- Dutch Zikula Community
Support questions in a Personal Message will be ignored. Use the forums at all times!
- Moderated by:
- Support
