GetSimple Support Forum

Full Version: fancy urls glued
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
Hi, what does this have to do with GetSimple??? You're using Salesforce Site.com CMS???
hah that was examples shoven duh
Great, now I feel like a moron! But after a re-read I finally understand what you meant. LOL.
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');