Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Local links - all points to root
#1
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]
Reply
#2
Show me exactly what you're manually entering in the address bar.
Reply
#3
(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).
Reply
#4
Try placing this in your htaccess file and see if it helps.

Code:
RewriteBase /algor.local/
Reply
#5
You have a bad permalink set or siteurl?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#6
(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.
Reply
#7
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.
Reply
#8
Ill file an issue to make sure we trim this.

try saving your permalink again from settings.php
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
(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.
Reply




Users browsing this thread: 1 Guest(s)