unistake Posted July 20, 2008 Share Posted July 20, 2008 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 Quote Link to comment Share on other sites More sharing options...
jeremyapp Posted July 20, 2008 Share Posted July 20, 2008 Save your CSS code on the server as "style.css" then, use this code in each page: <link rel="stylesheet" type="text/css" href="style.css" /> Quote Link to comment Share on other sites More sharing options...
unistake Posted July 20, 2008 Author Share Posted July 20, 2008 thanks for that! I didn't realise thats how multiple servers worked. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 20, 2008 Share Posted July 20, 2008 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" /> Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 21, 2008 Share Posted July 21, 2008 May I ask why you will be launching 50 websites? Seems pretty useless to me. Quote Link to comment Share on other sites More sharing options...
unistake Posted July 21, 2008 Author Share Posted July 21, 2008 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 ;-) Quote Link to comment Share on other sites More sharing options...
unistake Posted July 21, 2008 Author Share Posted July 21, 2008 Of course. That would be better than the 1st suggestion! I'll get there one day with all this css/php stuff! thanks for your posts Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.