Jump to content
zota

[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>
</ul>

 

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>
</ul>

 

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

Hi,

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

http://julio.x10host.com/pw2nd/

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)
Thanks

 

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.

Guest
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 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?
      Example:
      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
      ce90
    • 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.
       
      .htaccess.txt
    • By louisstephens
      So I have a project coming up soon and one of the goals was to use Google's AMP project for the project's mobile site. I have gone through the tutorials and think I have a good grasp on the matter, but there is still one roadblock I do not really know how to tackle. The site, which uses a responsive grid system, will look great on a mobile and desktop which was is fine by me. However, if a user comes from Google to one of our AMP pages (ie www.example.com/amp) and clicks on a url, they will then be loading our responsive mobile pages and not the amp pages. For the sake of consistency, we really want to "force" users to stay on all the amp pages.
       
      My current thoughts on how to set up this task:
      Allow url segments for all pages using "/amp" Using a simple if statement, load the amp page if it exists <?php if($input->urlSegment1) { // add "&& $input->urlSegment1 == 'amp'" if you've more urlSegments include("partials/amp-page.php"); } else { include("partials/normal.php"); } ?>  
      However, I have hit a roadblock on appending "/amp" to all pages if they came to an amp page via Google, or even if they are on mobile and visit the site. Is this even possible to do, or should we just use the amp pages (if a user comes from google) and allow them to be active on our mobile pages?  We are just trying to give the fastest load times possible, as well as give a consistent look between mobile and desktop versions. As always, I really appreciate the ideas and help.
×
×
  • Create New...