GetSimple Support Forum
Local links - all points to root - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Local links - all points to root (/showthread.php?tid=5357)



Local links - all points to root - algor - 2013-11-08

Hi! I have a little problem with links: all links point to index page (in menu, in admin panel ("view page"), in page text (when i insert link to local page)). get_page_url(); in all pages is root site URL. Also all URLs in site map are root URL too. But all pages work, if i manually enter its url in adress bar.

Fancy URLs is enabled.
.htaccess:
Code:
AddDefaultCharset UTF-8
Options -Indexes

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
<Files sitemap.xml>
        Order allow,deny
    Allow from all
    Satisfy All
</Files>

RewriteEngine on

# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]



RE: Local links - all points to root - eatons - 2013-11-08

Show me exactly what you're manually entering in the address bar.


RE: Local links - all points to root - algor - 2013-11-08

(2013-11-08, 10:19:25)eatons Wrote: Show me exactly what you're manually entering in the address bar.

What should be a direct link to the page. For example, http://algor.local/contacts — page is displayed correctly, that is the links are working, but even so all links in menu point to root (http://algor.local).


RE: Local links - all points to root - eatons - 2013-11-08

Try placing this in your htaccess file and see if it helps.

Code:
RewriteBase /algor.local/



RE: Local links - all points to root - shawn_a - 2013-11-08

You have a bad permalink set or siteurl?


RE: Local links - all points to root - algor - 2013-11-08

(2013-11-08, 11:02:19)shawn_a Wrote: You have a bad permalink set or siteurl?

All automatically generated links (menu, "view page" in admin panel, etc.) point to the home page. But permalinks work, when i manually enter them into adress bar or write in code of page.


RE: Local links - all points to root - algor - 2013-11-08

I looked at the source code and found the cause of this - in the function find_url variable $PERMALINK equal to a single space, because of this the code of "if ($PERMALINK != '' && $slug != 'index')" runs and $url breaks.

I will try to find the cause of incorrect value of the $PERMALINK.


RE: Local links - all points to root - shawn_a - 2013-11-08

Ill file an issue to make sure we trim this.

try saving your permalink again from settings.php


RE: Local links - all points to root - algor - 2013-11-08

(2013-11-08, 13:28:31)shawn_a Wrote: Ill file an issue to make sure we trim this.

try saving your permalink again from settings.php

Thank you.
The problem is solved. Indeed there was string with space. Re-save the settings helped me.