Jump to content


SEO URLs and htaccess


6 replies to this topic

#1 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 02 June 2009 - 12:39 AM

G'day,

On most of my Etomite based sites I have a .htaccess file with variations of the following in it:
RewriteEngine On
# RewriteBase /~jscubado/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

However, this doesn't solve a problem I'm having.

To improve my search engine rankings, I'd like everyone to be treated as if they came to my web site using a URL including www. That is, I don't want to be seen as splitting my page rank across two domains.

I want it so as if people put in the URL, http://scubadoctor.com.au/service.htm, they will get the URL http://www.scubadoct....au/service.htm

Can anyone help me to create a .htaccess file that achieves this?

Best Regards, Lloyd Borrett.

#2 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 02 June 2009 - 08:31 AM

add something like this ...

Quote

#
RewriteCond %{HTTP_HOST} !^www.roguegenecollective.com$ [NC]
RewriteRule ^(.*)$ http://www.roguegene...llective.com/$1 [L,R=301]
#


#3 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 02 June 2009 - 10:21 AM

I've used additional lines similar to that to solve the probelm for forums etc.

But I haven't been able to get it to work while still maintaining the use of user friendly URLs within Etomite.

Cheers, Lloyd Borrett.

#4 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 02 June 2009 - 03:20 PM

Here's a longer version of my .htaccess
# URL rewriting for Etomite CMS
#
RewriteEngine On
#
RewriteCond %{HTTP_HOST} !^www.roguegenecollective.com$ [NC]
RewriteRule ^(.*)$ http://www.roguegenecollective.com/$1 [L,R=301]
#

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# rewrite old gallery names
RewriteRule ^Gallery54.html$ /gallery-mike-finley.html [L,R=301,QSA]
# a whole load of these!

#remap generated gallery and image names
#some more rewrite rules with complex pattern matching very specific to this site

# and then the standard etomite one
RewriteRule ^(.*)\.html$ index.php?q=$1\.html [L,QSA]
#
# and a whole load of other stuff not relevant to this

I do recall it took me a few tries to get something that worked, but i don't recall what the problems were.
This is working with friendly URLs, and with some more complex URLs (for the galleries and images) generated by snippet code. see the Rogue Gene Collective website

#5 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 02 June 2009 - 06:58 PM

Thanks. That put me on the right track and I think it's now working properly.

Cheers, Lloyd Borrett.

#6 Guest_Quenby20_*

  • Guests

Posted 16 December 2010 - 09:37 AM

Hello,
How to install this snippet and make it work? I get this error:

XML-parsefout: geen element gevonde
Regelnummer 2, kolom 1:

I created a new snippet with the code, and altered my URL in the code. Then I made a template (empty), and a new page with the code to call the snippet, [[GoogleSiteMap]] and set the page to XML content.


Thanks
____________________
article submission

#7 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 16 December 2010 - 02:17 PM

Not real sure why this post is in this topic, but here goes...

Here is how I handle implementing the GoogleSiteMap snippet...

1.) Create a document:

Content Tab

Empty


Identification Tab

Page Title: Google Site Map
Alias: google-sitemap
Document Parent: Repository


Publishing Tab

Folder: Un-Checked
Rich Text: Un-Checked
Published: Checked
Searchable: Un-Checked
Cacheable: Un-Checked
Empty Cache: Checked
Uses Template: GoogleSiteMap_Template
Content Type: text/xml
Authenticate: Un-Checked
Show in menus: Un-Checked


2.) Create a Page Template

Template Name: GoogleSiteMap_Template
Template Description: Used to create a Google XML site map
Content: [!GoogleSiteMap_XML!]


Once this combination renders the site map properly I go through the regular motions of registering the site map through Google...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users