Don't create if from and to are the same
This commit is contained in:
		
							parent
							
								
									754a6cefb8
								
							
						
					
					
						commit
						654638dc43
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -127,6 +127,10 @@ function doRedirects(data){
 | 
			
		|||
				to = lines[i][1],
 | 
			
		||||
				type = lines[i][2] || 301,
 | 
			
		||||
				exact = lines[i][3] || false;
 | 
			
		||||
			if( from == to ){
 | 
			
		||||
				process.stdout.write("### No need to redirect " + from + "to itself ###\n\n");
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			let redirect = individualRedirect(from,to,type,exact);
 | 
			
		||||
			process.stdout.write("###Redirect from "+from+" to "+to+"###\n");
 | 
			
		||||
			process.stdout.write(redirect+"\n");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue