Jump to content
Ahmad

$config-urls-root

Recommended Posts

Hello,

I have problem when i add www to the domain.

i add www in config file, but the problem the $config->urls->root ,    output  is "domain.com" doesn't "www.domain.com"

what is the wrong??

Share this post


Link to post
Share on other sites

$config->urls->root should usually return "/"

Maybe you are looking for $config->urls->httpRoot

Or maybe you need to deal with htaccess redirects - in which case, uncomment the lines under section 13 of the .htaccess file.

  • Like 3

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 Kemal
      Hi,
      Probably easy question but i want to learn all the ways to do it.
      i uploaded ads.txt file to www.xxx.com/site/templates/ folder!
      now i want to open it from www.xxx.com/ads.txt
      how can i do it? 
       
       
    • By hellomoto
      I have web hosting with the following .htaccess en root, to point it to a subdirectory "audino.us", wherein I have PW installed:
      RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteCond %{REQUEST_URI} !^/something.com/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /audino.us/$1 RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteRule ^(/)?$ something.com/index.php [L] RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteRule ^(/)?$ something.com [L] However when I go to audino.us/pw to access the admin, it becomes audino.us/audino.us/pw, and doesn't allow me to log in. How do I render the above to be recursive (?), i.e., to apply to all subordinate URLs? Is this to be done within the .htaccess in /audino.us, or in the root .htaccess above? Please help, I can't log in. Thanks much.
    • By Tony Carnell
      Hi all,
       
      I'm just looking for some advice really.
      We've got a current website in the root of our hosting account and have been developing a new Processwire powered one in a sub-directory.
      We're now getting close to setting the new site live and I'm wondering which is best; leave the new site in the sub-directory and modify the .htaccess file to point to it, or remove the existing site and move the new one across to the root.
      We're also looking to install Piwik in its own folder too, together with the Piwik Analytics module. Would this work if the site remains in the sub-directory, because Piwik would effectively be in a sub-directory off a sub-directory?
      Basically it comes down to which is the more satisfactory option, leave it where it is versus move it to the root.
      If it stays in the sub-directory, I'll want to change the .htaccess file to point at that location, but also hide the sub-directory so it looks as if it's running from the root, e.g. the site is running from www.example.com/cms/ but the visitor never sees the /cms/ in the urls.
      Thanks in advance for any advice.
      Tony.
    • By gesp
      Hi there,
      Is there anyway in processwire to output the URL of the site, instead of the root. Because the root returns this value: "/" and I need it to return the URL.
      Thanks in advance
    • By photoman355
      I have a slightly unusual setup where I'm using the first child of the root as my homepage like so:   Root       Home       Page 2       Page 3        etc   This is presenting me with a slight problem in that I need the Home url in the navigation tree to redirect to Root.  Here's my navigation setup:   <?php $root = $pages->get("/"); $children = $root->children(); foreach($children as $child) { echo "<li><a href='#{$child->name}'></a><a href='{$child->url}'><h1>{$child->title}</h1></a></li>"; } ?> I'm sure there's a nice easy way to do this in PW, can anyone help?
      For data setup I have Home rendered in the Root page.  Looking at SEO would simply changing the menu structure be enough to stop robots indexing the root/Home url so that Home is seen as Root?  
×
×
  • Create New...