WordPress Search Engine Friendly URLs on Zeus Web Servers
Posted by admin_mwc on 14 August 2008 2:41 PM in Web Hosting, Wordpress Help | 0 Comments
Today, I had to install WordPress on one of my client’s web host, which happens to be a Zeus web server. I have never used a Zeus Web Server in my life and I had no idea it does not support the same URL rewriting syntax like Apache’s mod_rewrite.
What that means is the .htaccess file of WordPress is invalid on a Zeus web server. I uploaded the .htaccess file to the root folder of the web host and it disappears after I refresh the root folder. I read this blog post on how to activate WordPress permalinks on a Zeus web server and solved the problem.
I did not do it by create a rewrite.scipt file in the root folder. Instead, I entered the following code from the blog post I mentioned above into the control panel of the Zeus web server.
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:
Here’s what it looks like:

If you ask me, unless you have a very good reason to use a Zeus web server, get an Apache web server instead to avoid this little annoyance.

Subscribe today to receive my eBook "How to Make WordPress Search Engine Friendly" FREE!



Post a Comment