Advertisement:

Author Topic: public-profile url format  (Read 5229 times)

Web-Media

  • Sr. Member
  • ****
  • Posts: 459
  • Web
Re: public-profile url format
« Reply #120 on: May 10, 2019, 11:02:22 pm »
let see  if works .. in index. php a bout line 134
Code: [Select]
$basePath = rtrim($pathinfo['dirname'],'/');

            $router = new \AltoRouter();
           
            $router->setBasePath($basePath);
  look for it and replace with the code above

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #121 on: May 11, 2019, 06:48:10 am »
@Web-Media
Thank you very much! finally you fixed it  :)
now first bug fixed! let's fix the second bug!
second bug:
some browsers, etc, automatically put '/' at the end of url!
when you put '/' at the end of user-name, it gives 404 error!
ex. Yoursite.com/var-username/
Thanks,

Web-Media

  • Sr. Member
  • ****
  • Posts: 459
  • Web
Re: public-profile url format
« Reply #122 on: May 11, 2019, 10:39:39 am »
In your htacces
After
RewriteCond %{REQUEST_FILENAME} !-d
Add
RewriteRule ^/(.*)/$ /$1 [R=301,L]

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #123 on: May 11, 2019, 12:41:16 pm »
In your htacces
After
RewriteCond %{REQUEST_FILENAME} !-d
Add
RewriteRule ^/(.*)/$ /$1 [R=301,L]

did NOT work,
and also all my CSS did NOT work!

Web-Media

  • Sr. Member
  • ****
  • Posts: 459
  • Web
Re: public-profile url format
« Reply #124 on: May 11, 2019, 01:02:07 pm »
Thats server  config ..
Try google "remove trailing slash apache"

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #125 on: May 11, 2019, 02:29:53 pm »
Thats server  config ..
Try google "remove trailing slash apache"

but all of the website pages works with "/" except public-profile!
this is a plugin issue! because without plugin it works great!

somewhere in plugin, it checks the route or uri and doesn't accept "/"
please find that part of the code and remove "/" with str_replace
« Last Edit: May 11, 2019, 02:36:34 pm by Sophia_OS »

Web-Media

  • Sr. Member
  • ****
  • Posts: 459
  • Web
Re: public-profile url format
« Reply #126 on: May 11, 2019, 02:59:54 pm »
Ill look into it

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #127 on: May 11, 2019, 03:18:07 pm »
Thanks

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #128 on: May 13, 2019, 01:29:03 pm »
@Web-Media
Any update?

Web-Media

  • Sr. Member
  • ****
  • Posts: 459
  • Web
Re: public-profile url format
« Reply #129 on: May 16, 2019, 01:04:46 am »
classes /router.php
line 180
Code: [Select]
      // strip base path from request url
        $requestUrl = substr($requestUrl, strlen($this->basePath));
if( substr($requestUrl, -1) === "/" ){
$requestUrl = substr($requestUrl, 0, -1);
}
// Strip query string (?a=b) from Request Url

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #130 on: May 16, 2019, 09:49:58 am »
@Web-Media,
Awesome! Thank you very much!
now let's make this plugin even more powerful by adding search system to this plugin!
i'm waiting for your response!
Thanks again!

Web-Media

  • Sr. Member
  • ****
  • Posts: 459
  • Web
Re: public-profile url format
« Reply #131 on: May 16, 2019, 01:01:33 pm »
Hy.   This will have to wait a little .
I'm working on rewriting  some  osclass core code .. without breaking existing installs.
And second .. rewrite from scratch importing external libraries and classes

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #132 on: May 16, 2019, 02:34:27 pm »
@Web-Media,
Sure, please update here as soon as possible!
Thank you very much!