Page 1 of 1
Pretty urls not working?
Posted: Thu Oct 22, 2009 8:55 am
by ncd
Howdy,
I've checked the documentation and forums over and over to see what I might be missing, but I can only get my pretty urls half working!
The links are looking good, but for some reason they've decided to not actually link to my pages?
Can anyone see where I've gone wrong?
http://superadviceline.com.au/
My pages are there!
http://superadviceline.com.au/index.php?page=life-insurance
My config.php and .htaccess files are as per the documentation but can post them for you to check if need be.
Is it to do with this step by any chance?
---
Step 3 - {metadata} plugin call
Add the {metadata} plugin call to the section of your templates. This will automatically insert the base href tag to your site's root so that relative paths to files and images function as expected.
---
My {metadata} tag was already there of course, so didn't change anything...
thanks!
Re: Pretty urls not working?
Posted: Thu Oct 22, 2009 10:25 am
by Jos
I guess your .htacces file isn't right or you're on a windows server?
Re: Pretty urls not working?
Posted: Thu Oct 22, 2009 10:57 am
by ncd
Errrmm... yes, on windows server - is that a problem??
.htaccess
Code: Select all
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
Cheers!
Re: Pretty urls not working?
Posted: Thu Oct 22, 2009 11:01 am
by Jos
ncd wrote:
Errrmm... yes, on windows server - is that a problem??
I think so.. Windows won't do anything with htaccess. You may try the internal pretty urls? Change the setting in config.php from mod_rewrite to internal and see what happens.
[solved] Re: Pretty urls not working?
Posted: Thu Oct 22, 2009 10:28 pm
by ncd
Legend!! Thanks a lot... it's working now!
Re: Pretty urls not working?
Posted: Thu Oct 22, 2009 11:07 pm
by ncd
D'oh! I just noticed that it's actually displaying
http://superadviceline.com.au/index.php/life-insurance/life-insurance-article.html
Instead of
http://superadviceline.com.au/life-insurance/life-insurance-article.html
So how do I get rid of the /index.php part if you say that windows wont read .htaccess?
OR... does it not matter in terms of SEO... is it ok as long as we're getting the /life-insurance/life-insurance-article.html ?
Thanks again!
Re: Pretty urls not working?
Posted: Fri Oct 23, 2009 9:14 am
by Jos
well yeah, thats exactly the difference between url_rewrite and the internal pretty url system.
For SEO it doesn't matter I guess, it's only 'unpretty' when you use url's offline (marketing purposes etc)
I manage a website on a IIS6 server, where I got the opportunity to play with ISAPI_Rewrite. Unfortunately that didn't work out. For Joomla and Drupal I'm told this works fine, but I guess for CMSms there are some rewriterules that are not supported by ISAPI_Rewrite. The core works fine, but it goes wrong with modules.