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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
nilson
Forum Members
Forum Members
Posts: 15
Joined: Wed Apr 23, 2008 8:52 am

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

Post 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
Last edited by nilson on Fri Dec 04, 2009 5:17 pm, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

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

Post by Jos »

You could check the path settings in config.php ?

Also check if you do have the {metadata} tag in your template.
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am

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

Post by Ziggywigged »

What do you have your $config['root_path'] set to?
Take a penny, leave a penny.
nilson
Forum Members
Forum Members
Posts: 15
Joined: Wed Apr 23, 2008 8:52 am

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

Post 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
Last edited by nilson on Fri Dec 04, 2009 2:44 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”