Jump to content

Multiple websites - same css sheets


unistake

Recommended Posts

Hi all,

 

I am about to launch a string of websites, about 50, that all have the same layout hence the same css style sheets.

 

Is there any simple way I could change the code on all of the websites if I needed to update the templates at a later date? Instead of changing them all individually.

 

My site also has PHP and mysql databases if I could somehow use these...im a newby!

 

Many thanks for any help  ;D

Link to comment
https://forums.phpfreaks.com/topic/115706-multiple-websites-same-css-sheets/
Share on other sites

if you want to hide the fact that you are using one style sheet for each of these sites you can use a mod_rewrite in a .htaccess file to redirect any request for a css file to another url.

 

Options +FollowSymlinks
RewriteEngine On
RewriteRule \.css$ http://www.mastersite.com/style.css [NC,L]

 

(May or may not work depending on whether there are controls on where mod_rewrite can redirect to.)

 

alternatively you could simply give the full url of your style sheet(s) in the href of your link tag.

 

<link rel="stylesheet" type="text/css" href="http://www.yoursite.com/style.css" />

May I ask why you will be launching 50 websites? Seems pretty useless to me.

 

Sure! I am selling (or going to sell) php websites to a group of people. the sites will all be held in my own server and so i can link up the main site, mine, with their personal websites. These personal websites will be for a specific group of people.

I can't really say much because there is nothing like this in the internet market - and dont want any competition just yet!

 

Thanks for asking ;-)

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.