Remove K2 Category Prefix and ID		
	
	
	
		
	
	
	
	
	
		
		
				
		- 
			joomdude808
		
- 
													Topic Author
											
- 
				
	Offline
			
- 
				New Member			
- 
				  
		Less
		More
		
			
									- 
						Posts: 1					
- 
						Thank you received: 0					
- 
											
- 
											
 
	 
		 
		
			
	
						9 years 10 months ago				#4628
		by joomdude808
	
	
		
			
			
				I need help modifying my K2 URL structure to ensure:
1) Access K2 category URLs without category prefix and ID (200 internal redirect, remove: content/XX-)
2) Redirect all native K2 category URLs to the non-prefix/ID URL version
Original URL:
/path/content/23-category
New URL:
/path/category
(note: category ID could be any number)
The Trick:
Restrict access to K2 native category URL (with prefix and ID), so for example any visitor trying to access "/path/content/23-category" should be redirected to "/path/category" and "/path/content/117-anothercategory" would redirect to "/path/anothercategory"			
					 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
	
		
				
	
		Less
		More
		
			
									- 
						Posts: 3194					
- 
						Thank you received: 441					
- 
											
- 
											
 
	 
		 
		
			
	
						9 years 9 months ago				#4630
		by admin
	
	
		
			
			
				Hi,
what is not clear is if the destination URL already exists. I need to check a couple of real full URLs (old and new). If you prefer, send me an email at info(at)selfget.com with full URLs to call.			
					 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
	
		
				
	
		Less
		More
		
			
									- 
						Posts: 1					
- 
						Thank you received: 0					
- 
											
- 
											
 
	 
		 
		
	 
	
		
				
	
		Less
		More
		
			
									- 
						Posts: 3194					
- 
						Thank you received: 441					
- 
											
- 
											
 
	 
		 
		
			
	
						9 years 9 months ago				#4632
		by admin
	
	
		
			
			
				Hi Nikola,
the basic problem here is that you need a better URL routing while ReDJ is mainly a redirect extension. Just to give you an example of problems to solve, you need to drop a piece of the "working URL" like /categories-listing/, but the new shortest URL doesn't work (because doesn't exist) so ReDJ should redirect it to the original one. It could be done internally (with the enterprise version) but you need to identify a "pattern" in the requestes URLs to match (an example, any URLs starting with /aminokiselini/izolirani-amino/).
After this first step where you created a rule to redirect the short to the long, you should also create a second rule that redirects any of the original URL (the long) to the short. And that's not all... folks.
The biggest problem is that your site and your extension (hikashop in this example) will continue to generate long URLs, so your site will still contain URLs redirected elsewhere... maybe you can create shortest URL with hidden menu items.
Kind regards,
Luigi			
					 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
 
	
		
	
	
	
	
	
	
 
	
		Time to create page: 0.145 seconds