SEO links [SOLVED]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

SEO links [SOLVED]

Post by dmaireroa »

Hi there

I did some research, and found out that SEO links is good for ranking. At the moment, my site link is showing: http://www.dmaireroa.com/?page=work-website

Is there a way to change it to http://www.dmaireroa.com/work-website/

Many thanks in advance
CHEERS :)
Last edited by dmaireroa on Thu Jan 13, 2011 10:15 am, edited 2 times in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: SEO links

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: SEO links

Post by dmaireroa »

Hi Rolf, thanks for the info, however, I have been trying for ages, still couldn't get it right?

I believe I added the URL correctly e.g. www.dmaireroa.com/work-flash but the only thing, it is showing an error '404 Error - Not Found'

I added the following to the config.php:

Code: Select all

#------------
#URL Settings
#------------

#What type of URL rewriting should we be using for pretty URLs?  Valid options are:
#'none', 'internal', and 'mod_rewrite'.  'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates.  For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod_rewrite';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '/';

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
I'm not sure if my .htaccess file is correct?
RewriteEngine on
#
# Externally redirect direct client requests for "/index.php" to "/"
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php
RewriteRule ^index\.php$ http://www.dmaireroa.com/ [R=301,L]
#
# Externally redirect non-canonical, non-blank hostname requests to canonical hostname
RewriteCond %{HTTP_HOST} !^(www\.dmaireroa\.com)?$
RewriteRule ^(.*)$ http://www.dmaireroa.com/$1 [R=301,L]
What do you think I'm doing wrong?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: SEO links

Post by Dr.CSS »

First off / is not an extension, have you ever seen a file end in / ?... NO....

Use a real extension and use the htaccess.txt file in the root doc folder, put it in the root of site and rename to .htaccess...

This has always worked for me right out of the box...
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: SEO links

Post by Rolf »

Perhaps you are on a Windows server...
try

Code: Select all

$config['url_rewriting'] = 'internal';
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: SEO links

Post by dmaireroa »

Sweet! I got it going now, I added the code 'internal', however, just a slight problem (I think). My url is now http://www.dmaireroa.com/index.php/work-flash/ is still correct? Is there a way to remove the 'index.php' and make it http://www.dmaireroa.com/work-flash/ or is it better for SEO to leave as it is?

P.S am I better off using the extension .html, .php or /word/?
Last edited by Anonymous on Wed Mar 17, 2010 4:04 am, edited 1 time in total.
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: SEO links

Post by dmaireroa »

Dr.CSS wrote: First off / is not an extension, have you ever seen a file end in / ?... NO....

Use a real extension and use the htaccess.txt file in the root doc folder, put it in the root of site and rename to .htaccess...

This has always worked for me right out of the box...
Ah yes! It's working now, lucky I read your comment again DR, and realize there was a whole chunk of code in the htaccess.txt file.

Rolf - your original steps works, just that I didn't see that other file 'htaccess.txt' to save it as a .htaccess.

Man, that was a lot headaches for me, I don't know how you guys do it. All I can see is, you guys are awesome, and very smart.

Too easy, case solved.
CHEERS :)
Last edited by Anonymous on Wed Mar 17, 2010 4:18 am, edited 1 time in total.
Post Reply

Return to “Layout and Design (CSS & HTML)”