Posts: 3
Threads: 1
Joined: Feb 2013
Hi, sorry for my english.
for example i have url: http://site.com/subdir/page123.html
if I try to click on this link - http://site.com/page123.html, I get a page that http://site.com/subdir/page123.html
how to fix it?
Posts: 687
Threads: 63
Joined: Nov 2011
Hi, what does this have to do with GetSimple??? You're using Salesforce Site.com CMS???
Posts: 3
Threads: 1
Joined: Feb 2013
2013-02-23, 13:44:02
(This post was last modified: 2013-02-23, 13:44:14 by bo0bon.)
http://get-simple.info/start/cms-comparisons/ = http://get-simple.info/cms-comparisons/
but it must be 404 page
Posts: 6,267
Threads: 182
Joined: Sep 2011
hah that was examples shoven duh
Posts: 687
Threads: 63
Joined: Nov 2011
2013-02-23, 15:39:19
(This post was last modified: 2013-02-23, 15:40:27 by shovenose.)
Great, now I feel like a moron! But after a re-read I finally understand what you meant. LOL.
Posts: 3
Threads: 1
Joined: Feb 2013
my solution:
index.php
PHP Code:
# get data from page
$my101 = $_SERVER['REQUEST_URI'];
$data_index = getXML($file);
...
#http://site.com/subdir1/page_from_subdir1.html = ok
#http://site.com/page_from_subdir1.html = redirect
if (($parent != '') && (substr_count($my101,'/')==1)) {
redirect('/index.php');
}
#http://site.com/page1.html = ok
#http://site.com/page1.html/ = redirect
if ((strpos($my101, '.html/')!=0) || (strpos($my101, '.php/')!=0)) {
redirect('/index.php');
}