The subdomain site is: https://elmfield.manorway.org.uk
Main site: https://manorway.org.uk
Wordpress works fine on the main site (although it has no user input at present)
I am using namesco’s own rewrite.script:
‘ #Zeus webserver version of basic WordPress mod_rewrite rules
map path into SCRATCH:path from %{URL}
look for file at %{SCRATCH:path}
if exists then goto END
look for dir at %{SCRATCH:path}
if exists then goto END
match URL into $ with ^/blog/([_0-9a-zA-Z-]+/)?files/(.+)
if matched then
set URL=/blog/wp-includes/ms-files.php?file=$2
goto END
endif
match URL into $ with ^/blog/([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes|login).*)
if matched then
set URL=/blog/$2
goto END
endif
match URL into $ with ^/blog/([_0-9a-zA-Z-]+/)?(.*\.php)$
if matched then
set URL=/blog/$2
endif
match URL into $ with ^/blog/(.*)
if matched then
set URL=/blog/index.php
goto END
endif ‘
Permalink set as: https://manorway.org.uk/index.php/%postname%/
Multisite part of wp-confir.php:
‘
/* Multisite */
define( ‘WP_ALLOW_MULTISITE’, true);
define(‘MULTISITE’, true);
define(‘SUBDOMAIN_INSTALL’, true);
define(‘DOMAIN_CURRENT_SITE’, ‘manorway.org.uk’);
define(‘PATH_CURRENT_SITE’, ‘/’);
define(‘SITE_ID_CURRENT_SITE’, 1);
define(‘BLOG_ID_CURRENT_SITE’, 1);
‘
Appropriate Namesco dns settings:
–blank– .domain A record 85.233.160.70
elmfield .domain A record 85.233.160.70
www .domain CNAME manorway.org.uk
Any help in getting my subdomain to work would be very much appreciated.
]]>I am using manorway.org.uk as a test site for developing the new Clapham Youth Centre web site
https://cyc.manorway.org.uk/ is the main test site which will include subfolders for each area of the youth centre, eg: https://cyc.manorway.org.uk/karate https://cyc.manorway.org.uk/juniors https://cyc.manorway.org.uk/seniors etc
Clicking on one with a subfolder displays the contents but minus the theme!
I need help in getting the theme to display while using the correct rewrite.script.
All subfolders have been set to use the WP 2012 theme.
https://cyc.manorway.org.uk/ displays ok.
WordPress has provided the correct .htaccess and extra WP-config.php script within the Network Admin section that I need to use.
So, all you professional coders, can you please help convert the following (WP provided) .htaccess script into zeus rewrite.script?
I would be very grateful as this has now been bugging me for a long time.
.htaccess as produced by WP:
{\rtf1\ansi\ansicpg1252
{\fonttbl\f0\fmodern\fcharset0 Courier;}
{\colortbl;\red255\green255\blue255;\red51\green51\blue51;\red255\green255\blue255;}
\deftab720
\pard\pardeftab720\sl320\sa120\partightenfactor0
\f0\fs24 \cf2 \cb3 \expnd0\expndtw0\kerning0
\outl0\strokewidth0 \strokec2
# Not sure if the above script should be included?
RewriteEngine On\
RewriteBase / \
RewriteRule ^index\\.php$ – [L]\ \
# add a trailing slash to /wp-admin\
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]\ \
RewriteCond %\{REQUEST_FILENAME\} -f [OR]\
RewriteCond %\{REQUEST_FILENAME\} -d\
RewriteRule ^ – [L]\
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content | admin | includes).*) $2 [L]\
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\\.php)$ $2 [L]\
RewriteRule . index.php [L]}
Thank you.
]]>Themes work ok on ‘cyc.manorway.org.uk’ but refuse to work on sub folders: ‘cyc.manorway.org.uk/karate’. Subfolders have been set to use the WP theme 2012.
Is this because I have used both a subdomain and subfolders?
As you see I have configured the temporary test site www.manorway.org.uk for sub domains ‘cyc’ and sub folders, in this case ‘karate’.
My host is Namesco and their servers are Zeus based running Linux.
They have produced their own rewrite.script but this and others found online are unable to help in getting the themes to work in the subfolders.
cyc.manorway.org.uk has been setup with a ‘Wildcard’ in their DNS setup, although they say that it is not necessary.
There are no plugins running.
My present rewrite.script:
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: "
Script added to wp-config.php:
" /*Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'cyc.manorway.org.uk');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('WP_ALLOW_REPAIR', true);
/* That's all, stop editing! Happy blogging. */
[Moderator Note: Please post code & markup between backticks (not double quotes) or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Any help in getting themes to work on subfolders would be very much appreciated.
Thank you
]]>I had my Website set up using a static page as the front page (using a rewrite script with the below code)…..but when I switched the settings so that my front page “displays latest posts” the Homapge URL went from www.browzer.net to www.browzer.net/home. I cant get rid of the suffix now.
Is there any code I need to add to the script or what should I do?
Thanks
——————-
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:
My websites are hosted by Names Co who use Zeus servers and hence had a problem trying to find code or script to correct the probelm.
Eventually I did find the code and it did correct the problem except now I have the blog lagiraudiere.com/blog not being found or just looping.
Could anyone help me find the solution I have contatced my host who also are tryinbg but they seem to be having problems.
The script I used is,
match IN:Host into $ with ^lagiraudiere\.com$
if matched
match URL into $ with ^/(.*)$
if matched
set OUT:Location = https://www.lagiraudiere.com/$1
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
endif
endif
and this is what is happening as regards mail to and from my host
“Hi Yes I have had to use the script to divert NON WWW indexed pages to WWW indexed pages in order to correct the canonical problem.
I think I found the script at
https://www.names.co.uk/support/new/528-zeus_rewrite_rules_user_guide.html
The Zeus script below permanent 301 redirects any requests for “non-www” URL’s to the “www” equivalent for the “domain.co.uk” domain.
The actual script file I have placed on the /web directory I named or called “rewrite.script”
and the script in side is,
match IN:Host into $ with ^lagiraudiere\.com$
if matched
match URL into $ with ^/(.*)$
if matched
set OUT:Location = https://www.lagiraudiere.com/$1
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
endif
endifThe script is working as reagrds the canonical problem but I seem to have llost the blog. I saved the file as follows and uploaded via FTP “rewrite.script”
If you could take a moment to check what I need to do or add to the script it would be appreciated as the only help I can find when searching about zeus servers is you.
Thanks Paul”
Link to website now is
https://www.lagiraudiere.com/
and the blog is at
https://www.lagiraudiere.com/blog/
Regards
Paul
https://www.names.co.uk/support/hosting/linux_hosting/1119-wordpress_rewrite_script.html
The links are working fine on all mac browsers but having problems with IE7 and IE8. If you click any link IE closes and gives you the error pasted here:
https://www.gerireid.com/img/grab.bmp
I’ve sent this to Namesco and awaiting a reply. Has anyone encountered this before and can suggest a fix?
Appreciate your time
]]>I ended up doing a network site BUT the hosting service surprisingly use only Zeus on their servers (I know, should have triple checked, long story), which means problems with .htaccess rewrite rules.
I found this bit of code on forum, which seems to work well, I can make the site work, BUT I haven’t figured out how to get blogs search for stylesheets and files from the right place..
I made up a sample blog at https://stthomascrookes.org.uk/sample/ which demonstrates this problem. Below is the rewrite.script code I’m using now.
RULE_0_START:
# Get the document root path and put value into the SCRATCH array.
# This is the server path not the web URL.
# e.g. /content/DesignerPlus/i/n/domain.co.uk/web/
map path into SCRATCH:DOCROOT from /
# Get the URL without the domain.
# e.g. /test&colour=red
# e.g. /blog/2007/10/31/an-example-post/?color=red
set SCRATCH:ORIG_URL = %{URL}
set SCRATCH:REQUEST_URI = %{URL}
# See if there are any queries in our URL.
match URL into $ with ^(.*)\?(.*)$
# If there are…
if matched then
# Set a var to path without the domain part.
# e.g. /blog/2007/10/31/an-example-post
set SCRATCH:REQUEST_URI = $1
# Set a var to the passed queries.
# e.g. colour=red
set SCRATCH:QUERY_STRING = $2
endif
RULE_0_END:
RULE_1_START:
# This is setting a var to the server path and sub folders.
# e.g. /content/DesignerPlus/i/n/domain.co.uk/web//blog/2007/10/31/an-example-post
set SCRATCH:REQUEST_FILENAME = %{SCRATCH:DOCROOT}
set SCRATCH:REQUEST_FILENAME . %{SCRATCH:REQUEST_URI}
# Check to see if the file exists.
look for file at %{SCRATCH:REQUEST_FILENAME}
if not exists then
# The file wasn’t found so is it a folder?
look for dir at %{SCRATCH:REQUEST_FILENAME}
if not exists then
# No folder either. So now check the URL for special hosting folders.
match SCRATCH:ORIG_URL into % with ^/webmail|^/tech_support|^/controlpanel
if matched then
# If a special folder was requested end the script.
goto END
else
# There were no files, folders or special folders so set the new URL.
# — Sub directory ————————————————————-
# If the blog is in a sub directory…
# e.g. /blog/index.php/2007/10/31/an-example-post
match SCRATCH:REQUEST_URI into $ with ^/blog(.*)
if matched then
set URL = /blog/index.php$1
# — Top level —————————————————————–
# If the blog is in the top level of the site…
# e.g. /index.php/2007/10/31/an-example-post
else
set URL = /index.php%{SCRATCH:REQUEST_URI}
# If there is only a top level blog you can remove the
# match and surrounding if statements.
endif
# — —————————————————————————
# Go to the next rule.
goto RULE_2_START
endif
endif
endif
# If files or folders were found end the rewrite script.
goto END
RULE_1_END:
RULE_2_START:
# Check for queries in the requested URL.
match SCRATCH:ORIG_URL into % with \?(.*)$
if matched then
# If queries were found add them to the new URL.
# e.g. /index.php/2007/10/31/an-example-post/&colour=red
set URL = %{URL}&%{SCRATCH:QUERY_STRING}
endif
# — Sub directory ————————————————————-
# If you only want to rewrite the sub directory uncomment this bit.
match SCRATCH:ORIG_URL into % with ^/blog
if matched then
# — Sub directory ends ——————————————————–
# End the script.
goto END
# — Sub directory ————————————————————-
endif
# — Sub directory ends ——————————————————–
RULE_2_END:
]]>