Hi,

Secure pages is adding an extra forward slash to the URL of the page. So http://www.mydomain.com is fine but when I click on a secure link https://www.mydomain.com/example the URL reads https://www.mydomain.com//example even though the link itself is correct.

I've also noticed that if I refresh the page I get a page not found error and the URL changes to include /%252F. https://www.mydomain.com//%252Fexample.

So, this additional char is being added but I can't seem to find out where.

I'm also using secure pages hijack prevention module if that helps.

Does anyone have any similar problems or pointers on this?

Thanks for your help,

Comments

Anonymous’s picture

I've noticed that when I turn off clean urls the problem doesn't happen. Could this be something to do with the rewrite script?

I'm on a Zeus server using rewrite.script instead of .htaccess.

rewrite.script code

RULE_0_START:
# get the document root
map path into SCRATCH:DOCROOT from /
# initialize our variables
set SCRATCH:ORIG_URL = %{URL}
set SCRATCH:REQUEST_URI = %{URL}

# see if theres any queries in our URL
match URL into $ with ^(.*)\?(.*)$
if matched then
  set SCRATCH:REQUEST_URI = $1
  set SCRATCH:QUERY_STRING = $2
endif
RULE_0_END:

RULE_1_START:
# prepare to search for file, rewrite if its not found
set SCRATCH:REQUEST_FILENAME = %{SCRATCH:DOCROOT}
set SCRATCH:REQUEST_FILENAME . %{SCRATCH:REQUEST_URI}

# check to see if the file requested is an actual file or
# a directory with possibly an index.  don't rewrite if so
look for file at %{SCRATCH:REQUEST_FILENAME}
if not exists then
  look for dir at %{SCRATCH:REQUEST_FILENAME}
  if not exists then
    set URL = /index.php?q=%{SCRATCH:REQUEST_URI}
    goto QSA_RULE_START
  endif
endif

# if we made it here then its a file or dir and no rewrite
goto END
RULE_1_END:

QSA_RULE_START:
# append the query string if there was one originally
# the same as [QSA,L] for apache
match SCRATCH:ORIG_URL into % with \?(.*)$
if matched then
  set URL = %{URL}&%{SCRATCH:QUERY_STRING}
endif
goto END
QSA_RULE_END:  

Any ideas??

Thanks

Anonymous’s picture

Update.

I thought this might help someone else experiencing the same problem.

I've recently move the site that was experiencing the problem to a new Apache VPS and the issue has been fixed with no change to the site itself (other than replacing the rewrite.script with Drupal's .htaccess). So, I'm guessing this has something to do with the original hosts Zeus server. What the issue was I have no idea but at least the move has fixed my problem.