2020-08-14 21:47:50 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								<?php
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 14:40:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/********************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 21:47:50 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								//                       create-server-config.php
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 14:40:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								//                  Created by Yigit Kerem Oktay
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 21:47:50 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// This file generates a .htaccess file that contains all necessary
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 14:40:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// code for it.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// This is needed because some hosts do not either unzip hidden files
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// or neither GitHub puts that file inside the zips.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/********************************************************************/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								if(stripos($_SERVER['SERVER_SOFTWARE'],'apache')!== false){
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$f = fopen(".htaccess", "a+");
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 21:47:50 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$f2 = fopen("ApacheHtaccess","r");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								fwrite($f, fread($f2, filesize("ApacheHtaccess")));
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 14:40:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								fclose($f);
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 21:47:50 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								fclose($f2);
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 14:40:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								} else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$f = fopen("web.config", "a+");
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 21:47:50 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$f2 = fopen("IISWebConfig","r");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								fwrite($f, fread($f2, filesize("IISWebConfig")));
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 14:40:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								fclose($f);
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 21:47:50 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								fclose($f2);
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-14 14:40:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								?>
							 |