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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • 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> "; } } ?>  
    • By ce90
      Hello everyone,
      hopefully this is the right place to ask and is not a duplicate question.
      I'm pretty new to processwire, so... if this question is kind of funny for some of you, you're welcome 😄 
      I have the following issue and can't find anything understandable about it. Maybe I'm searching the wrong way, but anyways.. here is my question:

      How is it possible to rewrite the URLs, that I'll get a *.php ending?
      https://www.mysite.de/urlsegment/ -> https://www.mysite.de/urlsegment.php
      https://www.mysite.de/urlsegment/urlsegment/ -> https://www.mysite.de/urlsegment/urlsegment.php
      Because I've read a lot about "Why do you wanna do this or have that?" – here my answer for that in advance:
      I've built a processwire installation inside or around an existing website. Therefore, we want to keep the existing *.php Google entries. Sure, we could redirect via 301 Redirect, but would prefer to keep the *.php ending.
      If you have further questions, please do not hesitate to ask.
      Thank you in advance for your help.

      Best regards
    • By louisstephens
      So I have a project where multiple pages are sending POST data to 1 single template page.  All was working well (well, at least with one ajax post), but now I have hit a stumbling block. I figured  the "best" way to handle the request were to use url segments and then use the following in the status page:
      if ($config->ajax && $input->urlSegment1 == 'add-bookmark') { // some code here } However, this doesnt seem to really work (as I assume the the request isnt being posted to /status/ but rather to /status/add-bookmark/). What is the best way to actually handle this?
    • By joeck
      Hi Guys,
      I'm trying to do my first migration to the customers existing server (IIS 10) . I ran the site as a subdirectory on my website for test purposes (everything works fine).
      Following the tutorial of Joss, I tryed the site on a local xampp server to make sure, it also works on a root directory. So far so good, everything works.
      Now I moved the files (from the xampp) to the customers server. The root/index page is shown but for every subpage i get 404 Errors...
      Hence I followed the troubleshooting guide for not working URLs:
      On the first sight, the .htaccess file is not recognized, therefore I contacted the host support. They said, it is recognized but not all modules are supported in the processwire .htaccess file. I did the "öalskjfdoal" test in the .htaccess file and didn't get a 500 Error.... BUT the rewrite rule from the hosts support, to proof the file is read, DID work... The support claims, they do not provide debugging... so basically the .htaccess file is recognized and working, but not throwing any errors (for whatever reason).
      Working rewrite rule (from support):
      RewriteEngine On RewriteBase / RewriteRule ^test\.asp$ index.html [NC,L] RewriteRule ^test\.html$ konzept.html [NC,L] RewriteRule ^test2\.html$ team.html [NC,L] The support said, a couple modules are not supported in the htaccess file, the supported ones are listed here: http://www.helicontech.com/ape/ (I think mod_rewrite is supported)
      As I do not completely understand what exactly is happening in the htaccess file, I'm stuck. I tried all suggestions I found regarding this topic on the forum, but none of them solved the problem.
  • Create New...