Page 1 of 2

Zeus Server Issues

Posted: Mon Feb 15, 2010 11:04 pm
by ubique
Not sure if its a bug as such, but I know my Joomla site is not working as it should and today I discovered that my hosting company uses a Zeus and not Apache server!! The issues are:

1. Search Engine Friendly URLs do not function correctly and if I switch it on all the links on my site breaks.

2. The Apache mod_rewrite functionality does not work correctly.

3. There are also canonical issues on my site, whereby you can access the homepage via these different URLs:

www .mysite . ie/index.php

www .mysite . ie/

mysite . ie/index.php

mysite . ie/

4. 301 re-directs do not function correctly.

Does anyone have a workable solution tor these issues?

Thx

Re: Zeus Server Issues

Posted: Wed Feb 17, 2010 10:20 am
by ubique
Thankfully I have a hosting company that is prepared to help me with the SEF URLs & 301 re-direct issue on my site http://www.docklandsstudios.ie

I have attached the rewrite.script in this post to help others.

Re: Zeus Server Issues

Posted: Wed Feb 17, 2010 2:23 pm
by mcsmom
That's very cool, Joomla! doesn't officially support the Zeus server, but it's great to have unofficial solutions. Would you mind posting it in the tips and tricks part of the wiki?

http://docs.joomla.org/Category:Tips_and_tricks
You could also think of emailing to the cms-dev mailing list about it. As you may know we have recently done some work to make IIS support better, so I think the team will be interested in what
you have to say.

Re: Zeus Server Issues

Posted: Thu Feb 18, 2010 5:41 pm
by ubique
Update,

If you have the jSecure Authentication module running in Joomla 1.5 and a 'rewrite.script' then the backend Admin section disappears altogether!!

As the rewrite.script caters for the standard mod_rewrite rules that are required without the admin section plugin. I would suggest that you temporarily disable the rewrite.script (by renaming it), along with disabling the seo link options in the configuration.php file. This will permit you to access the administration section whilst your site continues to function.

If you wish to continue using the admin section redirect plugin, you may have to write an exception into your rewrite.script to permit the plugin to function correctly. Does anyone know of a script that will solve this issue?

Re: Zeus Server Issues

Posted: Thu Feb 18, 2010 7:24 pm
by mcsmom
Is that in some way relate to the Zeus server?

Re: Zeus Server Issues

Posted: Thu Feb 18, 2010 7:35 pm
by ubique
Yeah, its Zeus server

Re: Zeus Server Issues

Posted: Thu Feb 18, 2010 10:55 pm
by biablasta
The SEO issue plagued me for two weeks (on Zeus). I built the site on XAMPP with all the SEO settings turned on. Worked and looked fine. Uploaded the site to the server and it was scrambled. Eventually discovered host server was Zeus (didn't know it mattered) and through trial and error worked out that the SEO settings were the problem. Turned them off. All ok again.

To enable the SEO I found a script in another post (can't remember where but it was after an exhaustive search of the forum). I have attached the text. It was supplied by a UK hosting company. It is slightly different. You can't use htaccess and must switch off the Apache mod_rewrite in Global Config. I have no problems since installing it but I don't know the first thing about such things. Perhaps someone who does can compare the two. It might not have the same issue with the iSecure mod above.

PD

Re: Zeus Server Issues

Posted: Fri Feb 19, 2010 5:30 pm
by ubique
biablasta,

I tried your script and it works perfectly on all my website links.

Thanks for posting

Re: Zeus Server Issues

Posted: Sun Feb 21, 2010 1:13 pm
by mcsmom
I'd really appreciate it if you would

1, post that in tips and tricks
2. post a topic on the cms development list.


I started a page for you here:

http://docs.joomla.org/Zeus_server

Re: Zeus Server Issues

Posted: Sun Feb 21, 2010 2:21 pm
by ubique
Okay will post learnings so far....

The boxes around the code have come up funny and excluded 1 or 2 lines - do oyu know how to correct his?

Re: Zeus Server Issues

Posted: Mon Feb 22, 2010 4:53 am
by mandville
wiki editing can be fun.
Is that more of how you saw the page being done?

Re: Zeus Server Issues

Posted: Fri Mar 19, 2010 1:08 am
by rusty1001
the rewrite txt...

you dont say what to do with it????

rename is the .htaccess... add to the htaccess... or add to server ..how does it know what to do??

cheers

Re: Zeus Server Issues

Posted: Fri Mar 19, 2010 1:26 am
by mandville
just to say i have added the code from the txt file to the page OBO the poster
http://docs.joomla.org/Zeus_server

Re: Zeus Server Issues

Posted: Fri Mar 19, 2010 1:49 am
by rusty1001
Thanks

what do you do with this code??? thanks for the help...where do you put it?

Re: Zeus Server Issues

Posted: Fri Mar 19, 2010 1:53 am
by mandville

Re: Zeus Server Issues

Posted: Fri Mar 19, 2010 10:40 am
by ubique
rusty1001 wrote:Thanks

what do you do with this code??? thanks for the help...where do you put it?
Put the code goes into a new .txt file and save it as 'rewrite.script' and place it in the root directory of your website. Change the current .htaccess file to '.htaccess_old'.... and it then turn 'on' SEO URLs in the Global Config panel and it should work

Re: Zeus Server Issues-SEF urls

Posted: Sat May 15, 2010 4:25 pm
by blagilly
Hi All, I am dealing with the same issue & have tried to create a file called rewrite.script.txt, & switch on SEO in configuration but what happens is my homepage works as normal, but every other link has no formatting on the page, no graphics & layout all over the page. the server is Zues & desperating trying to get SEF urls working asap, please help...

Re: Zeus Server Issues

Posted: Sun May 16, 2010 11:49 am
by biablasta
Call the new file "rewrite.script". The ".txt" is added here on the forum so that the file does not read as a script. It stops it from working. So delete ".txt" from your file name.

Re: Zeus Server Issues

Posted: Mon May 17, 2010 1:41 pm
by blagilly
Hi All, I am dealing with the same issue & have tried to create a file called rewrite.script.txt, & switch on SEO in configuration but what happens is my homepage works as normal, but every other link has no formatting on the page, no graphics & layout all over the page. the server is Zues & desperating trying to get SEF urls working asap, please help...


Hi there, try adding the file rewrite.script to the root folder & then switching on Search Engine Friendly URLs, & still my pages are displaying without any formatting. Would the fact I'm using JA purity template. Please help, I've been trying this for a while & am going crazy trying to fix it.

Re: Zeus Server Issues

Posted: Mon May 17, 2010 2:35 pm
by biablasta
blagilly wrote:Hi All, I am dealing with the same issue & have tried to create a file called rewrite.script.txt, & switch on SEO in configuration but what happens is my homepage works as normal, but every other link has no formatting on the page, no graphics & layout all over the page. the server is Zues & desperating trying to get SEF urls working asap, please help...


Hi there, try adding the file rewrite.script
WHERE DID YOU GET THE SCRIPT FROM?

to the root folder & then switching on Search Engine Friendly URLs,
HAVE YOU CORRECTLY SET THE SEO SETTINGS IN GLOBAL CONFIG?
SHOULD BE YES, NO, YES - IN THAT ORDER

& still my pages are displaying without any formatting. Would the fact I'm using JA purity template.
NO. SO AM I.

Please help, I've been trying this for a while & am going crazy trying to fix it.

Re: Zeus Server Issues

Posted: Mon May 17, 2010 2:59 pm
by blagilly
Hi Thanks BiaBlasta

I got the script on here, should I edit the code, or something??? I have uploaded it, maybe you could help, maybe its the wrong code, have yes no yes, turn on, cheers for your help

Re: Zeus Server Issues

Posted: Mon May 17, 2010 3:06 pm
by blagilly
OMG I eventually got it to work, I had the wrong code, now I need to get rid of the index.php, also the .html,
for example: www.mysite.com/index.php/marketing.html

Can I get it to just read, www.mysite.com/marketing

at last thanks

Re: Zeus Server Issues

Posted: Mon May 17, 2010 3:19 pm
by biablasta
In the SEO settings set the last setting to NO. This will drop the html suffix. However, if you have a lot of menus/links you might find that they don't work because the html suffix will already be part of the address. You will need to edit each hyperlink (i.e. delete ".html") and recreate your menus.

I can't help with the index.php. Could never get rid of it. I think you need an SEO extension. Look in the extensions directory for SEO or SEF.

Re: Zeus Server Issues

Posted: Fri May 21, 2010 5:39 pm
by LesleyT
I have my joomla site in a sub directory and have tried the script talked about above, with the moderation I found here:
http://www.rootcreative.co.uk/blog/joom ... s-servers/

If your Joomla installation is in a sub-folder of your website:
Simply copy and paste the code into a text file, “set URL = /index.php?q=%{SCRATCH:REQUEST_URI}” to “set URL = /YOUR SUB-FOLDER/index.php?q=%{SCRATCH:REQUEST_URI}” then save the file as “rewrite.script”.

So I altered /YOUR SUB FOLDER/ to /test/, which is my subdirectory, and uploaded the whole script file, into the same directory as my joomla installation. ButI I am still not making it work, does anybody have any experience of putting this script into a subdirectory?

Re: Zeus Server Issues

Posted: Fri May 21, 2010 8:04 pm
by biablasta
It would help to clarify something.

It seems to me that if you follow the instructions from rootcreative, you will create a script (with the edit for sub-folders) and put it in the same folder as the one containing your joomla installation sub-directory.

To quote "Now upload the rewrite.script file to the same directory that your sub-folder is in". Now say your root directory is called Web/, you would normally have all your Joomla folders and files in this folder. And normally you would also put your script file here, in Web/, because for the script to work it must be in the root directory of your installation.

Therefore, if you move the Joomla folders and files into a sub-directory, (such as Web/sub-folder/) try moving the script into the sub-folder as well.

So make sure that the script and Joomla files are in the same folder, and set your SEO settings in the Global Config to Yes, No, and Yes(if you want .html added to you url) in that order.

Re: Zeus Server Issues

Posted: Fri May 21, 2010 8:30 pm
by LesleyT
OK, in a bit of a 'monkeys & typewriters' way, I've made it work, I'd appreciate any comments or advice.

I've put the script outside my joomla subdirectory (in my root folder) and altered the path in these two places to include my subdirectory (test)

map path into SCRATCH:DOCROOT from /test/

set URL = /test/index.php?q=%{SCRATCH:REQUEST_URI}

Re: Zeus Server Issues

Posted: Sat May 22, 2010 11:18 am
by biablasta
Good stuff.

It would be helpful if you made a copy of your entire script as a .txt file and attached it to a post. That way other people can see exactly how to adapt the previous script for use with a sub-folder. Zeus based servers seem to be getting more common.

Re: Zeus Server Issues

Posted: Sun May 23, 2010 6:25 am
by LesleyT
Replace the two instances of subfolder in this script with the name of the folder which contains your joomla installation, but put this script outside of that folder, in the root folder of your website.

BUT this seems to throw out certain aspects of the web pages that are in the root folder, so clearly I haven't completely solved the problem. If there is anyone out there who can help with this I'd be grateful for your input.

Code: Select all

RULE_0_START:
    # get the document root
    map path into SCRATCH:DOCROOT from /subfolder/
    # 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 = /subfolder/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:

Re: Zeus Server Issues

Posted: Mon Sep 13, 2010 10:19 am
by butlins12
This solution works for me, but doesn't this only address part of the functionality of the .htaccess file. Below the SEF rewrites are a bunch of security rewrites:

Code: Select all

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
I've not seen anything that would replicate this in the scripts above. I did use the Namesco conversion application which generated this:

Code: Select all

RULE_0_START:
match URL into $ with ^/(.*)$
if not matched then goto RULE_0_END
# RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
set SCRATCH:COND = %{QUERY_STRING}
match SCRATCH:COND into % with mosConfig_[a-zA-Z_]{1,21}(=|\%3D)
if matched then goto RULE_0_CODE_START
# RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
set SCRATCH:COND = %{QUERY_STRING}
match SCRATCH:COND into % with base64_encode.*\(.*\)
if matched then goto RULE_0_CODE_START
# RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
set SCRATCH:COND = %{QUERY_STRING}
insensitive match SCRATCH:COND into % with (\<|%3C).*script.*(\>|%3E)
if matched then goto RULE_0_CODE_START
# RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
set SCRATCH:COND = %{QUERY_STRING}
match SCRATCH:COND into % with GLOBALS(=|\[|\%[0-9A-Z]{0,2})
if matched then goto RULE_0_CODE_START
# RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
set SCRATCH:COND = %{QUERY_STRING}
match SCRATCH:COND into % with _REQUEST(=|\[|\%[0-9A-Z]{0,2})
if not matched then goto RULE_0_END
RULE_0_CODE_START:
# Second half of: RewriteRule ^/(.*)$ index.php [F,L]
set URL = index.php
# This rule has [F]
set RESPONSE = 403
set BODY = Access to this page is denied
# Implicit [L] when converting
goto END
# This rule has [L]
goto END
RULE_0_END:
But at the same time it threw an error:

Code: Select all

Unknown variable expansion: QUERY_STRING
And if it's pasted into the rewrite.script (I tried as RULE_0 before the SEF script and renumbered the SEF rules, and RULE_3 after the SEF) it breaks the SEF.

Like most people here, I've got even less of a clue about Zeus rewrite.script than I do about Apache .htacess - if anyone knows more and has the time to work it out, I'd be grateful.

Re: Zeus Server Issues

Posted: Mon Sep 20, 2010 6:01 am
by h2mao
LesleyT wrote:Replace the two instances of subfolder in this script with the name of the folder which contains your joomla installation, but put this script outside of that folder, in the root folder of your website.

BUT this seems to throw out certain aspects of the web pages that are in the root folder, so clearly I haven't completely solved the problem. If there is anyone out there who can help with this I'd be grateful for your input.

Code: Select all

RULE_0_START:
    # get the document root
    map path into SCRATCH:DOCROOT from /subfolder/
    # 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 = /subfolder/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:

I'd followed this way but no luck - our plateform are under Zeus as well.

1. I've put the script outside my joomla subdirectory (in my root folder).
So the URL is creativecompany.com.au/rewrite.script - if for URL visit.

And altered the path in these two places(in the text file "rewrite.script") to include my subdirectory (/clients/shorehire.com.au/)
map path into SCRATCH:DOCROOT from /clients/shorehire.com.au/

set URL = /clients/shorehire.com.au/index.php?q=%{SCRATCH:REQUEST_URI}
2. Set my SEO settings in the Global Config to:
Yes, No, Yes
(I'd also tried Yes, No, No)


After that, homepage looks good, but when I visit category URLs, it shows Joomla 404 Errors - not apache 404 Errors:
http://creativecompany.com.au/clients/s ... ducts.html

I'd also tried "NO" for suffix URL and no luck. It returned homepage layout without css.
http://creativecompany.com.au/clients/s ... ducts.html


404 - Component not found

You may not be able to visit this page because of:
xxxxx
xxxxx

The normal link (without SEO rewrite) still working fine - thery are all working good locally.
http://creativecompany.com.au/clients/s ... &Itemid=65


Looks like the rewrite already works but not working proparly.

Anything wrong with my setting?

TO someone click on the link I'd post, I'd made SEO config to No,No,No for clients review at the moment, you may get different error results.