David,
I had initially set this up using a ‘shortname’ to match my sites. Looking at this now, I’m assuming that for me to match successfully to a domain I’ll need to store the domain name in the database, but this will then have an effect on my rewriting as I’m currently matching on the shortname but need to also match the domain name.
Could you help me? Do I need to match to the domain name
Domain: www.branch-1.com
Shortname: branch-1
Points to: www.parentcompany.com/klvc/klvc_store.php?klvc=branch-1
Domain: www.branch-2.com
Shortname: branch-2
Points to: www.parentcompany.com/klvc/klvc_store.php?klvc=branch-2
vhosts (local on port 81)
<VirtualHost *:81>
ServerName local.branch-1.com
DocumentRoot C:/wamp/www/parentcompany
</VirtualHost>
<VirtualHost *:81>
ServerName local.branch-2.com
DocumentRoot C:/wamp/www/parentcompany
</VirtualHost>
Current .htaccess
Options +FollowSymlinks
RewriteEngine on
#Need rewritecond in here
#Catch specific reference to a klvc page
RewriteRule ^klvc/([-a-zA-Z0-9]+)/([0-9]+)$ /klvc/klvc_store.php?klvc=$1&mantext_id=$2 [L]
RewriteRule ^klvc/([-a-zA-Z0-9]+)$ /klvc/klvc_store.php?klvc=$1 [L]
#Catch specific reference to a news article
RewriteRule ^klvc/([-a-zA-Z0-9]+)/news/article-([0-9]+)$ /klvc/klvc_news.php?klvc=$1&newsid=$2 [L]
RewriteRule ^klvc/([-a-zA-Z0-9]+)/news$ /klvc/klvc_news.php?klvc=$1 [L]
#Catch specific reference to a booking form
RewriteRule ^klvc/([-a-zA-Z0-9]+)/booking/([a-zA-Z0-9]+)$ /locator/book/?id=$2 [L]
#Catch specific reference to a contact form
RewriteRule ^klvc/([-a-zA-Z0-9]+)/contact/([a-zA-Z0-9]+)$ /locator/book/?id=$2 [L]
#Catch anything left with klvc in it
RewriteRule ^klvc/$ /locator/index.php [L]
Many thanks