Page 1 of 1

SEO links [SOLVED]

Posted: Sun Mar 14, 2010 5:59 am
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 :)

Re: SEO links

Posted: Sun Mar 14, 2010 8:38 am
by Rolf

Re: SEO links

Posted: Tue Mar 16, 2010 2:54 pm
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?

Re: SEO links

Posted: Tue Mar 16, 2010 3:40 pm
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...

Re: SEO links

Posted: Tue Mar 16, 2010 3:53 pm
by Rolf
Perhaps you are on a Windows server...
try

Code: Select all

$config['url_rewriting'] = 'internal';
Rolf

Re: SEO links

Posted: Wed Mar 17, 2010 3:59 am
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/?

Re: SEO links

Posted: Wed Mar 17, 2010 4:17 am
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 :)