[SOLVED] Pretty URL - internal links refer to IP instead of domain name
Posted: Fri Dec 04, 2009 12:50 pm
Hello,
I am using pretty URL with
in my cms_root/config.php. It works fine so far. However, as soon as I navigate from my CMS home page to a subpage, the domain name in my browser gets replaced with the server ip.
I.e. instead of
the line reads
In cms_root/.htaccess I got the following
What would I have to do in order to refer to my domain name instead of the ip address?
Thanks,
nilson
I am using pretty URL with
Code: Select all
$config['url_rewriting'] = 'internal';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
I.e. instead of
Code: Select all
http://domain.com/cms/index.php/concept.html
Code: Select all
http://server-ip/cms/index.php/concept.html
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
# 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 ^(.+).html$ index.php?page=$1 [QSA]
Thanks,
nilson