Viewer URL Question
2 posts by 2 authors in: Forums > CMS Builder
Last Post: July 26, 2010 (RSS)
By theclicklab - July 24, 2010
Hi there,
I have a simple site and an using a page called index.php so I can keep the site url's nice and short.
Ideally I want the url's to be:
www.domain.com/page-name-123/
For viewer URL's I have set the Detail Page Url to "/" but I get the url generated without the domain name as:
http://page-name-123/
If I change the Detail Page Url to "index.php" I get:
http://www.domainname.com/index.php/Page-Name-123/
So two questions:
1. how to I get the url working without index.php
2. why does the page name go from lower case in the first example (ideal) to default case in the second example?
Thanks!
I have a simple site and an using a page called index.php so I can keep the site url's nice and short.
Ideally I want the url's to be:
www.domain.com/page-name-123/
For viewer URL's I have set the Detail Page Url to "/" but I get the url generated without the domain name as:
http://page-name-123/
If I change the Detail Page Url to "index.php" I get:
http://www.domainname.com/index.php/Page-Name-123/
So two questions:
1. how to I get the url working without index.php
2. why does the page name go from lower case in the first example (ideal) to default case in the second example?
Thanks!
Re: [aquaman] Viewer URL Question
By Jason - July 26, 2010
Hi,
The '_link' field will just output a relative url (ie. detialPage.php?Page-name-123).
If you're using rewrite rules, however, this can cause some problems. Your best bet would be to not use the '_link' field and create your own link.
For example, if your using the title and num fields for (Page-name and 123) you could do something like this:
(EXAMPLE)
You would have to change the names based on what you're using in your .php file and what you have in the database.
Hope this helps.
The '_link' field will just output a relative url (ie. detialPage.php?Page-name-123).
If you're using rewrite rules, however, this can cause some problems. Your best bet would be to not use the '_link' field and create your own link.
For example, if your using the title and num fields for (Page-name and 123) you could do something like this:
(EXAMPLE)
<?php
$queryString = str_replace(" ","-",$record['title'])."-".$record['num'];
$queryString = strtolower($queryString);
?>
<a href="http://www.domainname.com/<?php echo $queryString;?>/">TEXT HERE</a>
You would have to change the names based on what you're using in your .php file and what you have in the database.
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/