Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URL Corrector plugin
#1
URL Corrector plugin thread

GetSimple is a very good CMS, but it has one very big problem. It doesn't correct incorrect urls. For example you have a page, and you can get access to it by four different ways. It's unacceptable for search optimization, because for search engines it's looks like different pages with same content.

URL Corrector plugin created to solve this problem. If fancy URLs are enabled in settings menu, plugin correct any incorrect URL by pattern, that defined in settings menu.

Get more information and download plugin you can here http://get-simple.info/extend/plugin/url...ctor/1052/ or here https://github.com/f30d0r/url-corrector
Reply
#2
(2016-07-08, 06:25:59)f30d0r Wrote: URL Corrector plugin thread

GetSimple is a very good CMS, but it has one very big problem. It doesn't correct incorrect urls. For example you have a page, and you can get access to it by four different ways. It's unacceptable for search optimization, because for search engines it's looks like different pages with same content.

URL Corrector plugin created to solve this problem. If fancy URLs are enabled in settings menu, plugin correct any incorrect URL by pattern, that defined in settings menu.

Get more information and download plugin you can here http://get-simple.info/extend/plugin/url...ctor/1052/ or here https://github.com/f30d0r/url-corrector


Hi,

This plugin for SEO is good but does not work. I have installed Latest Stable Version GetSimple 3.3.10 and activated fancy URLs with plugin, but when navigating to the new post my screen is blank.
I have deployed it on localhost with OpenServer.


Any suggestions? Thank you.
Reply
#3
(2016-07-14, 17:08:14)steam Wrote: Hi,

This plugin for SEO is good but does not work. I have installed Latest Stable Version GetSimple 3.3.10 and activated fancy URLs with plugin, but when navigating to the new post my screen is blank.
I have deployed it on localhost with OpenServer.


Any suggestions? Thank you.

Hello. Probably you see blank screen because code execution has an error, and I need to know what kind of error is it.

Add this PHP code to plugin file before other code to turn on error messages
PHP Code:
ini_set('error_reporting'E_ALL);
ini_set('display_errors'1);
ini_set('display_startup_errors'1); 

Also, I need to know your Apache and PHP version.
Reply
#4
(2016-07-14, 21:21:53)f30d0r Wrote:
(2016-07-14, 17:08:14)steam Wrote: Hi,

This plugin for SEO is good but does not work. I have installed Latest Stable Version GetSimple 3.3.10 and activated fancy URLs with plugin, but when navigating to the new post my screen is blank.
I have deployed it on localhost with OpenServer.


Any suggestions? Thank you.

Hello. Probably you see blank screen because code execution has an error, and I need to know what kind of error is it.

Add this PHP code to plugin file before other code to turn on error messages




PHP Code:
ini_set('error_reporting'E_ALL);
ini_set('display_errors'1);
ini_set('display_startup_errors'1); 

Also, I need to know your Apache and PHP version.



Hi,

My Apache version is:  Apache/2.4.10 (Win32)
Loaded Modules:
core mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_headers mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_socache_shmcb mod_ssl mod_status mod_php5

My PHP version is:  5.5.19

Open Server 5.2.2


Images error:

[Image: image.png]
https://s32.postimg.org/ieh5gddqd/image.png


[Image: image.png]
https://s32.postimg.org/acezu79s5/image.png


Thanks.
Reply
#5
Do you know the solution for this error ?
Thank you
Reply
#6
(2016-07-19, 16:14:07)steam Wrote: Do you know the solution for this error ?
Thank you

Sorry, now I have not time to resolve this problem. In few days I try to find time to find solution to fix this bug.
Reply
#7
(2016-07-19, 16:14:07)steam Wrote: Do you know the solution for this error ?
Thank you

This problem you have with clean installation of getsimple, or you have other installed plugins? Do you edit any CMS files?
Reply
#8
(2016-07-25, 02:07:06)f30d0r Wrote:
(2016-07-19, 16:14:07)steam Wrote: Do you know the solution for this error ?
Thank you

This problem you have with clean installation of getsimple, or you have other installed plugins? Do you edit any CMS files?

I just installed in the clean version and I have problems displaying new pages. 
I have error on main page, and the new pages are not shown (404 error) because the domain name is cut. 
Did you try the plugin on localhost?

[Image: image.png]

line 84:

$parent = $pagesArray[$id]['parent'];


[Image: image.png]

[Image: image.png]

Thanks
Reply
#9
Sad 
This plugin support is dead... Zero solutions in one month
Reply
#10
I prefer to use .htaccess (mod_rewrite) for that. Another alternative would be to use Front-Router plugin: https://github.com/lokothodida/gs-front-router/releases
Reply
#11
(2016-08-08, 01:08:00)steam Wrote: This plugin support is dead... Zero solutions in one month

Yes, it's problem of free software. I'm one simple human and I have a lot of other tasks.

I fix problem with in folder installation, that provoked 404 error. Also, some problems with custom fancy urls fixed to.
You can download new version of plugin from http://get-simple.info/extend/plugin/url...ctor/1052/ or https://github.com/f30d0r/url-corrector/...es/tag/1.1
Reply
#12
(2016-08-08, 01:19:17)Bigin Wrote: I prefer to use .htaccess (mod_rewrite) for that. Another alternative would be to use Front-Router plugin: https://github.com/lokothodida/gs-front-router/releases

Yes, I think that .htaccess instruction would be best solution too. Do you have htaccess instruction to rewrite urls and solve this problem?

Thanks for suggestion.
Reply
#13
(2016-08-08, 02:29:44)f30d0r Wrote:
(2016-08-08, 01:08:00)steam Wrote: This plugin support is dead... Zero solutions in one month

Yes, it's problem of free software. I'm one simple human and I have a lot of other tasks.

I fix problem with in folder installation, that provoked 404 error. Also, some problems with custom fancy urls fixed to.
You can download new version of plugin from http://get-simple.info/extend/plugin/url...ctor/1052/ or https://github.com/f30d0r/url-corrector/...es/tag/1.1

Thanks for the solution, I will try it.
Reply
#14
What problem?
I have no particular problem with this and I think the search engine does not invent any abstrakt URL structure if these does not really exist.
It sounds paranoid to me if you think you should try to avoid URL structure like http://my-site.com/(parent)/child or index.php?id=page. The search engine will never be able to reach them or even know that these pages exist if these do not listed anywhere. In this context, I do not believe it makes much sense, I think you should only configure RewriteEngine to prevent some errors that user could do when copying URLs, such as a forgotten trailing-slash, or errors which have occurred during typing, such as a domain with or without the "www" prefix for example. It’s not difficult - I only use following entry to enforce a trailing-slash policy:

Inserted after the "RewriteBase /" line

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R=301]

And if you prefer naked domain names, so you can redirect to when a user requests with www:

Code:
RewriteCond %{HTTP_HOST} !^your-domain.com [NC]
RewriteRule ^/?(.*)$ http://your-domain.com/$1 [L,R=301]
Reply
#15
(2016-08-08, 05:42:21)Bigin Wrote: What problem?
I have no particular problem with this and I think the search engine does not invent any abstrakt URL structure if these does not really exist.
It sounds paranoid to me if you think you should try to avoid URL structure like http://my-site.com/(parent)/child or index.php?id=page. The search engine will never be able to reach them or even know that these pages exist if these do not listed anywhere. In this context, I do not believe it makes much sense, I think you should only configure RewriteEngine to prevent some errors that user could do when copying URLs, such as a forgotten trailing-slash, or errors which have occurred during typing, such as a domain with or without the "www" prefix for example. It’s not difficult - I only use following entry to enforce a trailing-slash policy:

Inserted after the "RewriteBase /" line


Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R=301]

And if you prefer naked domain names, so you can redirect to when a user requests with www:


Code:
RewriteCond %{HTTP_HOST} !^your-domain.com [NC]
RewriteRule ^/?(.*)$ http://your-domain.com/$1 [L,R=301]


I have seen that all these url:

http://site.com/index.php?id=page

http://site.com/page/
http://site.com/parent/page/
http://site.com/fakeparent/page/

in the source code have 
<link rel="canonical" href="correct page url" />


It is another way to prevent duplicate content used by CMS GetSimple

You're right that not need to do anything.

You just have only treat mirror site with www.

Thank you so much for everything
Reply
#16
You can use my plugin Extra Router to check that all parents are in url.

Configuration: 
[Image: 2po8x02.png]
http://flexphperia.net - my portfolio
Reply
#17
(2016-08-08, 19:17:35)mganko Wrote: You can use my plugin Extra Router to check that all parents are in url.

Configuration: 
[Image: 2po8x02.png]

Hi, I installed your plugin but do not understand exactly what it doing and how to configured it.
Can you copy this code php here? Not only the image...

I am sorry.
Reply
#18
To get this plugin to work, you need to extract url_corrector.php to the plugins folder. i.e. Move it from plugins\url-corrector-1.2\ up to \plugins.



I also found that menus at the parent level would only show a blank page...



home|about us|contact|documentation menu header|



.. so the id about-us and contact would show a blank page, but any links below the documentation menu header worked fine.


I modified the code by commenting the code to handle urls without a parent, as follows, and it seems to be working on xampp local installation php 7.1. (extract from url_corrector_init())...


Code:
 if ($id == "" or $id == "index") {
   url_corrector_redirect(preg_replace("/\/$/","",$url.$query));
   return true;
//  } else if ($parent=="") {
//    url_corrector_redirect(find_url($id).$query);
//    return true;
 } else {
//    $urn = str_replace(array("%slug%","%parent%"), array($id,$parent), $urn_mask);
   url_corrector_redirect(find_url($id,$parent).$query);
   return true;
 }
}

Getsimple 3.3.13
php 7.1
Other plugins:
GST AdminLock
GS Shortcodes
kt block login
Simple Backups

I'll report back if there are problems taking this live.
Reply
#19
Using this plugin with i18n and fancy urls, I have a problem with language in url.
Plugin does not work correctly with pattern: %language%/%parent%/%slug%/

Is any possibility to fix it?
Reply
#20
(2018-09-19, 18:02:08)vestris Wrote: Using this plugin with i18n and fancy urls, I have a problem with language in url.
Plugin does not work correctly with pattern: %language%/%parent%/%slug%/

Is any possibility to fix it?

Well what exactly is the problem, you haven't given us a lot to go on? [Image: smile.gif]
Reply
#21
Problem is "400 Bad Request"

All links do not work and look like this:
http://mysite.com/%language%/page/?lang=fr

When I turn off this plugin, link is:
http://mysite.com/fr/page
Reply




Users browsing this thread: 2 Guest(s)