Jump to content

[SOLVED, not] strange URL - browser shows all server path

Recommended Posts

Hello @zota,

first of all it would be good, if you would show how you have build your navigation.

Have you made a simple navigation with a foreach of all children linking to their url, like in this tutorial, or have you made something different?

With no further information it is difficult to help you. 😉

Regards, Andreas

Share this post

Link to post
Share on other sites

You have to recheck how you are using Bootstrap css
This isn't going anywhere:

<a class="navbar-brand" href="#">Casa da Lógica</a>

In your processwire backend did you rename Home to logos ?

This way of navigation is not going to work:

<ul class="nav navbar-nav">
<li class='active'><a href='/logos/'>Home</a> </li>
<li><a href='/logos/oficina/'>Oficina</a> </li>
<li><a href='/logos/logica/'>Lógica</a> </li>


You have to use  $pages->get to make the navigation work:

<ul class="nav navbar-nav">
<li class='active'><a href="<?php echo $pages->get("/logos/")->url ?>">Home</a> </li>
<li><a href="<?php echo $pages->get("/logos/oficina/")->url ?>">Oficina</a></li>
<li><a href="<?php echo $pages->get("/logos/logica/")->url ?>">Lógica</a></li>


Why do you link to your pages Oficina and Lógica like /logos/oficina/ and /logos/logica/ ?

It should be /oficina/ and /logica/

Make a screenshot of your backend




Share this post

Link to post
Share on other sites

OK, thanks for the tips, I'll re chek in a few hours.  It was working on my localhost and I presume my check was too lazy before the upload... 😒 Don't get mad

I'll give notice, maybe it will be good for other lazy people...

Share this post

Link to post
Share on other sites


No, not problem solved, but seems I have news (or I am totally confused).

After some try I become suspicious about the server and softaculous. (Yep I started my pw install with the same softaculous.)

Went on a new softaculous install of Minimal Site Profile just for testing.   After the install, without any login or change,  I gave a few clicks on the menu. And

the browser starts showing things like: http://julio.x10host.com/home/juliox15/public_html/pw2nd/
and the right would be


without the anoying home/juliox15/public_html/

right? (pw2nd is a subdir where softaculous installed pw Minimal Site Profile)
If you are curious, you can follow one or both of those links, not in a hurry to kill it.
Besides leave softaculous alone or give another server a try, any suggestion?
(Meanwhile I messed up the previous install but that's life)


Edited by zota
make it more clear

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By humanafterall
      I have a URL field that will sometimes have relative/local URLs on a multilingual site, for example /contact/ 

      However the URL field does not seem to pick up when I'm on another language, for example /fr/ so I'm taken to the default language page for /contact/ rather than /fr/contact/
      Is there a way to make the URL fields play well with a multi-language site?
    • By Robin S
      A new module that hasn't had a lot of testing yet. Please do your own testing before deploying on any production website.
      Custom Paths
      Allows any page to have a custom path/URL.
      Note: Custom Paths is incompatible with the core LanguageSupportPageNames module. I have no experience working with LanguageSupportPageNames or multi-language sites in general so I'm not in a position to work out if a fix is possible. If anyone with multi-language experience can contribute a fix it would be much appreciated!

      The module creates a field named custom_path on install. Add the custom_path field to the template of any page you want to set a custom path for. Whatever path is entered into this field determines the path and URL of the page ($page->path and $page->url). Page numbers and URL segments are supported if these are enabled for the template, and previous custom paths are managed by PagePathHistory if that module is installed.
      The custom_path field appears on the Settings tab in Page Edit by default but there is an option in the module configuration to disable this if you want to position the field among the other template fields.
      If the custom_path field is populated for a page it should be a path that is relative to the site root and that starts with a forward slash. The module prevents the same custom path being set for more than one page.
      The custom_path value takes precedence over any ProcessWire path. You can even override the Home page by setting a custom path of "/" for a page.
      It is highly recommended to set access controls on the custom_path field so that only privileged roles can edit it: superuser-only is recommended.
      It is up to the user to set and maintain suitable custom paths for any pages where the module is in use. Make sure your custom paths are compatible with ProcessWire's $config and .htaccess settings, and if you are basing the custom path on the names of parent pages you will probably want to have a strategy for updating custom paths if parent pages are renamed or moved.
      Example hooks to Pages::saveReady
      You might want to use a Pages::saveReady hook to automatically set the custom path for some pages. Below are a couple of examples.
      1. In this example the start of the custom path is fixed but the end of the path will update dynamically according to the name of the page:
      $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); if($page->template == 'my_template') { $page->custom_path = "/some-custom/path-segments/$page->name/"; } }); 2. The Custom Paths module adds a new Page::realPath method/property that can be used to get the "real" ProcessWire path to a page that might have a custom path set. In this example the custom path for news items is derived from the real ProcessWire path but a parent named "news-items" is removed:
      $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); if($page->template == 'news_item') { $page->custom_path = str_replace('/news-items/', '/', $page->realPath); } }); Caveats
      The custom paths will be used automatically for links created in CKEditor fields, but if you have the "link abstraction" option enabled for CKEditor fields (Details > Markup/HTML (Content Type) > HTML Options) then you will see notices from MarkupQA warning you that it is unable to resolve the links.
      Install the Custom Paths module.
      The custom_path field is not automatically deleted when the module is uninstalled. You can delete it manually if the field is no longer needed.
    • By AndZyk
      I am currently building a intranet which will be hosted on the local network of a company. This intranet has many links to files on their fileserver with the protocol file://.
      So for example the links look like this file://domain.tld/filename.ext
      When I try to insert such a link into a URL field, I get the error, that only the protocol http:// is allowed. When I try to insert such a link into a CKEeditor link, it gets stripped out. Is it possible to insert such links into the FieldType URL and CKEditor.
      I know that I could use a FieldType Text or insert a RewriteRule in the .htaccess file, but I am looking for a more elegant solution. 😉
      Regards, Andreas
    • By stanoliver
      The following code snippet is part of my markup simple navigation and the url_redirect (url field in the backend) just works fine when I put an special custom url into the url_redirect field.
      <?php $nav = $modules->get("MarkupSimpleNavigation"); // topnav $current = $page->rootParent(); // current root page // subnav echo $nav->render(array( 'max_levels' => 2, 'item_tpl' => '<h4><a class="g8-bar-item g8-hover-black" href="{url_redirect|url}">{title}</a></h4><hr class="sidenav">', 'collapsed' => true, ), $page, $current); ?>  In my seperated breadcrumb navigation I use the following code snippet
      <?php foreach($page->parents()->append($page) as $parent) { echo "<li><a href='{$parent->url_redirect|url}'>{$parent->title}</a></li>"; } ?> Now to the problem: In my first code snippet above the
      works just fine but when I try something similiar in the second code snippet
      I produce an server error How do I have to change the second code snippet so that it works in the correct way as the first code snippet does?
    • By gregory
      Hi everyone.
      I can't see the PDF uploaded via a field called "pdf".
      I get a url like this: http://localhost:8888/mywebsite/site/assets/files/1129/test.pdf%EF%BB%BF%EF%BB%BF
      Could anyone help me? Thank you.
      <?php foreach($page->case_studies as $item) { if($item->type == 'contenuto') { echo " <a class='btn btn-primary btn-sm' target='blank' href='{$item->pdf->first()->url}' role='button'>Download</a> "; } } ?>  
  • Create New...