Page 1 of 1

[SOLVED] Pretty URL - internal links refer to IP instead of domain name

Posted: Fri Dec 04, 2009 12:50 pm
by nilson
Hello,
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';
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

Code: Select all

http://domain.com/cms/index.php/concept.html
the line reads

Code: Select all

http://server-ip/cms/index.php/concept.html
In cms_root/.htaccess I got the following

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]
What would I have to do in order to refer to my domain name instead of the ip address?

Thanks,
nilson

Re: Pretty URL - internal links refer to IP instead of domain name

Posted: Fri Dec 04, 2009 1:11 pm
by Jos
You could check the path settings in config.php ?

Also check if you do have the {metadata} tag in your template.

Re: Pretty URL - internal links refer to IP instead of domain name

Posted: Fri Dec 04, 2009 1:26 pm
by Ziggywigged
What do you have your $config['root_path'] set to?

Re: Pretty URL - internal links refer to IP instead of domain name

Posted: Fri Dec 04, 2009 2:42 pm
by nilson
Oh, that was easy. I had

Code: Select all

$config['root_url'] = 'http://server-ip/cms';
and replaced that with my domain/cms.

@Jos: {metadata} is (and was before) in my Template

Works great

Thanks,
nilson