Forum Moderators: phranque

Message Too Old, No Replies

Zeus Web Server - Equiv for 301 re-direct

Need info re code for permanent redirect from non-www

         

malta

9:04 am on May 13, 2006 (gmt 0)

10+ Year Member



Will really appreciate if someone can guide me to setup a .htaccess file or equivalent for a website to permanently redirect non-www to my www main website.
My hosting company is using Zeus. Tried to contact zeus support, but no help at all till this moment.

Hope someone can help me out.

Thanks a lot,
Mark

jdMorgan

1:52 pm on May 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A quick search [google.com] turns up a thread which may be helpful to you as the first result.

Jim

malta

9:25 am on May 15, 2006 (gmt 0)

10+ Year Member



Thanks for reply,

I made many searches and been through many other forums too. Even went on zeus.com and through their help section. Still have no idea where to start from. Zeus support is really not up to standard.

Considering I am a newbie in this matter, I am looking for simple explanation of what file to create, where to upload it and what to include for a simple permanent redirect from my non-www to my main www website.

Will really appreciate if someone who knows how to use Zeus can guide me.

Thanks a lot

malta

9:32 am on May 15, 2006 (gmt 0)

10+ Year Member



The only thing my hosting company can tell me is the following (no other help is available apparently)

................................................

While we do support .htaccess files, much of the mod_rewrite functionality is not available.

However, you can use Zeus rewrite rules which work in a very similar way. For example, a mod_rewrite rule of:

RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^[^/]*\.html$ index.php

Would convert to:

match URL into $ with ^[^\/]*\.html$
if matched then
set URL = index.php
endif

This should be placed in a file named rewrite.script in your web directory.

...............................................

Questions based on such reply:
- Shall I create a .htaccess or rewrite.script?

Too many ^,\,/,] for a newbie to know what to replace! Let's say I want anything non-www such as:

- destinationmalta.com
- destinationmalta.com/index.html

to be permanently re-directed to:

- www.destinationmalta.com

What do you people think the code should look like?

Sorry for taking your time, but maybe I can find someone who can help me here.

jdMorgan

1:31 pm on May 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The basic problems are that this forum is dedicated to Apache, and you're asking about Zeus -- A completely-different server. While the members who contribute here may have extensive experience with Apache, we may all be 'newbies' when it comes to Zeus.

In addition, you are asking about server configuration code that may cause your server to crash -- or worse, to fail intermittently in very subtle ways, if incorrectly written.

Any attempt to extrapolate from Apache to Zeus would be pure speculation. And since you are asking about code that can cause your server to mis-operate if it's coded incorrectly, the members here are understandably reluctant to 'guess' if it might take your server down and cause your site to become inaccessible.

I'd suggest you study the short regular-expressions tutorial cited in our forum charter [webmasterworld.com], since regular expressions form the basis for both Apache mod_rewrite and whatever Zeus calls their rewriting facility, as well as being used in PERL, PHP, and many other languages and operating system utilities such as grep on Unix.

You might want to ask your hosting support personnel for the URL of the documentation for the Zeus rewriting facility. Another thing to consider is whether you might be better off with a more widely-used server, such as Apache or Microsoft IIS.

Jim