GetSimple Support Forum
fancy urls glued - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: fancy urls glued (/showthread.php?tid=4351)



fancy urls glued - bo0bon - 2013-02-23

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?


RE: fancy urls glued - shovenose - 2013-02-23

Hi, what does this have to do with GetSimple??? You're using Salesforce Site.com CMS???


RE: fancy urls glued - bo0bon - 2013-02-23

http://get-simple.info/start/cms-comparisons/ = http://get-simple.info/cms-comparisons/
but it must be 404 page


RE: fancy urls glued - shawn_a - 2013-02-23

hah that was examples shoven duh


RE: fancy urls glued - shovenose - 2013-02-23

Great, now I feel like a moron! But after a re-read I finally understand what you meant. LOL.


RE: fancy urls glued - bo0bon - 2013-03-03

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');