www.domain.com/nz/ to www.domain/New_Zealand/

Using a single web hosting account to host multiple sites

www.domain.com/nz/ to www.domain/New_Zealand/

Postby camelx99 » Sat Dec 02, 2006 11:59 pm

The technical set-up is as follows:
www.domain.com (joomla set-up with .htaccess)
www.domain.com/nz/ (joomla set-up with .htaccess), see below the code.

I would like that /nz/ is changed by /New_Zealand ... I tried it below without success. Is there somebody who could help me out.
Thanks, Rik

.htaccess file in the /nz root.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(/nz/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /nz/index.php
#RewriteRule ^([^/New_Zealand]+)/?$ /nz/$1/ [QSA,L]
camelx99
 
Posts: 2
Joined: Sat Dec 02, 2006 11:27 pm

Postby richardk » Sun Dec 03, 2006 2:57 pm

Try adding the following to your .htaccess file in your document root (/)
Code: Select all
RewriteRule ^New_Zealand(/(.*))?$ /nz/$2 [QSA,L]

after
Code: Select all
RewriteEngine On
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby camelx99 » Mon Dec 04, 2006 1:23 am

I tried to include this proposed change into the application without success. Nothing changed?? Please find below both .htaccess files. Maybe I made somewhere a fualt

Main Website
.htaccess
RewriteEngine On
RewriteRule ^New_Zealand(/(.*))?$ /nz/$2 [QSA,L]
RewriteBase /
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php

On /nz level
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(/nz/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /nz/index.php
camelx99
 
Posts: 2
Joined: Sat Dec 02, 2006 11:27 pm

Postby richardk » Mon Dec 04, 2006 10:52 am

Nothing changed??

What do you mean? Mod_rewrite doesn't change anything, you have to change the way links are outputted, mod_rewrite just changes the fake URL (New_Zealand) into real URL (nz) when the fake URL is requested.

Go to /New_Zealand and see if it's working.

If it isn't working try the following in the document root (/) .htaccess file:
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(New_Zealand/)component/option,com(/.*)?$ /$1index.php [NC,L]

Delete the /nz .htaccess file.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 15 guests

cron