pretty urls issue

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
amin30b
Forum Members
Forum Members
Posts: 146
Joined: Sat Mar 31, 2007 8:02 am

pretty urls issue

Post 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?
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: pretty urls issue

Post by Wishbone »

Does your host support .htaccess files (Apache?) and mod_rewrite?
User avatar
amin30b
Forum Members
Forum Members
Posts: 146
Joined: Sat Mar 31, 2007 8:02 am

Re: pretty urls issue

Post 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
User avatar
amin30b
Forum Members
Forum Members
Posts: 146
Joined: Sat Mar 31, 2007 8:02 am

Re: pretty urls issue

Post 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? :-\
User avatar
amin30b
Forum Members
Forum Members
Posts: 146
Joined: Sat Mar 31, 2007 8:02 am

Re: pretty urls issue

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: pretty urls issue

Post 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...
Post Reply

Return to “Modules/Add-Ons”