Page 1 of 1

anchor again

Posted: Tue Nov 17, 2009 10:55 pm
by mox
Hi,
before ask I visited this links, without success
http://forum.cmsmadesimple.org/index.ph ... 315.0.html
http://forum.cmsmadesimple.org/index.ph ... 191.0.html
http://forum.cmsmadesimple.org/index.ph ... 072.0.html
http://forum.cmsmadesimple.org/index.ph ... 285.0.html

I try all the trick, but the behaviours is always the same:
when i clik on one anchor or , the page reload, go to the position, and immediateley go to home page (domain root)

I use mod rewrite with a supersimple htaccess that work on every conf from 1.4.x to now; I use the .html extension on the page; I don't use any "main" anchor in the template, only in the page; I use TinyMCE, but I try to edit html with the same result...
I only need an inpage anchor, but isn't possible?

My conf:
----------------------------------------------

Cms Version: 1.6.5

Installed Modules:

    * CMSMailer: 1.73.14
    * FileManager: 1.0.1
    * MenuManager: 1.6.2
    * ModuleManager: 1.3.1
    * News: 2.10.3
    * nuSOAP: 1.0.1
    * Printing: 1.0.3
    * Search: 1.6.1
    * ThemeManager: 1.1.1
    * TinyMCE: 2.5.4
    * CGExtensions: 1.10.1
    * NMS: 2.2
    * CodeMirror: 0.1.1
    * bMenu: 0.4.7
    * SiteMapMadeSimple: 1.1.4
    * FormBuilder: 0.5.12
    * FormBrowser: 0.2.3


Config Information:

    * php_memory_limit:
    * process_whole_template: false
    * max_upload_size: 50000000
    * default_upload_permission: 664
    * assume_mod_rewrite: true
    * page_extension: .html
    * internal_pretty_urls: false
    * use_hierarchy: true


Php Information:

    * phpversion: 5.2.11

Any suggestion?

Re: anchor again

Posted: Wed Nov 18, 2009 11:14 am
by Russ
The only way I could get it to work was to make it page specific, annoying, but true...
On http://www.weddingsandportraitphotography.co.uk/portraits/
I used...

Code: Select all

<a href="portraits/#Help_using_the_Gallery">'Help using the gallery'</a>
And
On http://www.weddingsandportraitphotography.co.uk/weddings/

Code: Select all

<a href="weddings/#Help_using_the_Gallery">'Help using the gallery'</a>
Unless of course someone has another good idea?

Re: anchor again

Posted: Wed Nov 18, 2009 12:22 pm
by mox
Thank Russ for the reply,
I had already tried this way.
The exact behaviour is:
when i click the first time on a link (go to anchor) it work; the second time redirect to the home page

For experiment I change the mod_rewrite option about the page extension in this way
from

Code: Select all

$config['page_extension'] = '.html'
to

Code: Select all

$config['page_extension'] = ''
but the result is always the same...

Where is the wrong conf?

Maurizio

Re: anchor again

Posted: Wed Nov 18, 2009 12:29 pm
by mox
another test:
in windows -> IE8 it's all right (sic)
Chrome, Safari and Firefox have the same wrong behaviours

Normally, I work on Linux (Ubuntu or Debian) with Firefox

Re: anchor again

Posted: Wed Nov 18, 2009 4:14 pm
by Russ
Mox as you can see it works on mine? With repeated clicks in all browsers? Are you saying it does not?

I use:

Code: Select all

$config['page_extension'] = '/';
Possibly also in your mod_rewite? I use...

Code: Select all

# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
RewriteCond %{QUERY_STRING} http\: [OR]
#OR if the URI contains a "["
RewriteCond %{QUERY_STRING} \[ [OR]
#OR if the URI contains a "]"
RewriteCond %{QUERY_STRING} \] [OR]
#OR if the URI contains a "<__script__>"
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#OR script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#OR any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) 
RewriteRule ^.*$ - [F,L] 
# END Filtering

# 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 ^(.+)$ index.php?page=$1 [QSA]