Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2013-01-11 19:12:02

mmpo
Member
Registered: 2012-01-23
Posts: 240
Website

[FIXED IN 1.0.6] The url of video set wrong dont redirect

Offline

#2 2013-01-11 20:31:47

mmpo
Member
Registered: 2012-01-23
Posts: 240
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

i know about the canonical update but i need too that redirect to the unique url correct for other razon.

Offline

#3 2013-01-11 21:17:16

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

Yeah...makes sense. We need to have a redirect also. Will add in 1.0.6.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#4 2013-01-11 21:26:35

mmpo
Member
Registered: 2012-01-23
Posts: 240
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

Waoo man but i can wait for the next version i can do anything now?

I'm gonna have millions of errors because of previous redirections. I know you don't care about SEO, but tons of errors have effect in how google will place a site on his results. Thousands of duplicated titles, descriptions will generate lots of duplicated content on my site. Google will kill me!

Last edited by mmpo (2013-01-11 21:31:06)

Offline

#5 2013-01-12 03:17:18

mmpo
Member
Registered: 2012-01-23
Posts: 240
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

I dont know if the mode correct but i do it:

public static function match($query)
	{
		// backwards compatibility with <= 1.0.4, will be removed in 1.2
		// every url is redirected by default, no need to use the match function
		return TRUE;	
	}
}
?>
 

Replace for
 

public static function match($query)
	{
		// need to make sure any matching url passed to this function
		// gets a 301 redirect if the match is not exact
		// examples:
		// www.domain.com/symtab -> www.domain.com/symtab/
		// www.domain.com/symtab.html -> www.domain.com/symtab/
		// www.domain.com/video/video_id/title-here.html -> www.domain.com/video/video_id/title-here/
		// www.domain.com/video/video_id -> www.domain.com/video/video_id/
		// www.domain.com/video/video_id/title-here -> www.domain.com/video/video/video-id/title-here/
		// FIX FOR UPPER CASE LETTERS
		if (isset($_GET['q'])) {
			$request	= utf8_strtolower($_GET['q']);
			if ($request == rtrim($query, '/')) {
				// we need this to support UTF8
				$q		= (utf8_is_ascii($request))
					? preg_replace('/[^A-Za-z0-9\-\_\/]+/', '', $request)
					: preg_replace('/[^\pL\pN\-\_\/]+/u', '', $request);
				$url 	= BASE_URL.'/'.$q.'/';
				$parts	= explode('?', CURRENT_URL);
				if (isset($parts['1'])) {
					$args = array();
					foreach ($_GET as $key => $value) {
						if ($key != 'q') {
							$args[urlencode($key)] = urlencode($value);
						}
					}	
				
					if ($args) {
						$url .= '?'.http_build_query($args);
					}
				}
			
				VF::redirect($url, '301');
			}
		}
		
		if (isset($_GET['q']) && $request == $query) {
			return true;
		}
		
		return false;
	}
}
?>

I need your help its work fine but i need know is this dont afect other part of the script
Thank you

Offline

#6 2013-01-12 10:11:22

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

You dont affect other parts of the script.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2013-01-12 14:49:42

takeit
Member
Registered: 2012-12-01
Posts: 54

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

this is big problem
can some1 explain how to fix ?

Offline

#8 2013-01-12 15:54:33

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

It is not a big problem, but it is a problem. I will redo the match function so it only checks if the url matches and if not redirect is required.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#9 2013-01-12 16:44:51

takeit
Member
Registered: 2012-12-01
Posts: 54

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

Ok how to do that ? Can you email me fix ?

Offline

#10 2013-01-12 16:55:55

mmpo
Member
Registered: 2012-01-23
Posts: 240
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

You can fix with that I say , edit: /libraries/framework/uri.php

And remplace that i put up

Adrian thank you for you help too because i dont have idea bout this i dont know any about php i only test if work fine i keep for this i ask if this not afect other part of the script , but if you say that its ok i keep.

Thank you

Last edited by mmpo (2013-01-12 16:56:11)

Offline

#11 2013-01-12 19:47:19

takeit
Member
Registered: 2012-12-01
Posts: 54

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

mmpo wrote:

You can fix with that I say , edit: /libraries/framework/uri.php

And remplace that i put up

Adrian thank you for you help too because i dont have idea bout this i dont know any about php i only test if work fine i keep for this i ask if this not afect other part of the script , but if you say that its ok i keep.

Thank you

But i register you have same problem after it , clikc on links in starting thread

Offline

#12 2013-01-14 08:33:56

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

Will release 1.0.6 with a fix today.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#13 2013-01-14 09:25:05

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED IN 1.0.6] The url of video set wrong dont redirect

So 1.0.6 will contain a fix for this and it will work this way: video view, photo view, album view, pornstar view (mainly view pages) will redirect to the correct URL (simply because the id for the request was good) and for the rest of the pages if the requested url is not correct it will return a 404.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB