Page 1 of 1

pretty urls issue

Posted: Wed Jan 26, 2011 4:24 pm
by amin30b
I`m using 1.9.2 version.
I tried to setup pretty urls as described in wiki.
I`m using a sub directory with name cmsms192;
I modified my config.php code to this:

Code: Select all

$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true; // this will be the standard from 1.7
$config['query_var'] = 'page';
and this is my htaccess txt file content

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /cmsms192

# 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>
I tried to do it as described in wiki but Not Found
page error will appear in pages.
How could I solve this issue?

Re: pretty urls issue

Posted: Wed Jan 26, 2011 4:49 pm
by Wishbone
Does your host support .htaccess files (Apache?) and mod_rewrite?

Re: pretty urls issue

Posted: Wed Jan 26, 2011 5:12 pm
by amin30b
Wishbone wrote:Does your host support .htaccess files (Apache?) and mod_rewrite?
Yes it supports, I tried .htaccess file instead of htaccess.txt file and the issue solved.
tnx

Re: pretty urls issue

Posted: Wed Jan 26, 2011 5:27 pm
by amin30b
excuse me! I tried

Code: Select all

$config['page_extension'] = '';
instead of

Code: Select all

$config['page_extension'] = '.html';
and it works fine.

Will it affect on search engines efficiency?
I like to have no page extension in website pages but does it make conflict with search engines like google? :-\

Re: pretty urls issue

Posted: Wed Jan 26, 2011 6:22 pm
by amin30b
I`ve posted my last post after doing [SOLVED] action but anyway hope to somebody guide me about page extension and reply to my last question,
that is very important for me ::)
thanks in advance

Re: pretty urls issue

Posted: Wed Jan 26, 2011 6:25 pm
by Dr.CSS
I would use some kind of page extension as I've seen some problems with certain modules when none is used, and besides most everyone expects something on the end...