WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to switch to absolute-path references (siteurl)? (3 posts)

  1. AskApache
    Member
    Posted 7 years ago #

    I am trying to modify a template to conform to my personal system of naming conventions and link/file strutures.. specifically I am wanting to change the full uri currently being used by wordpress:

    [scheme] [authority] [path] [query] [fragment]
    to
    [path]

    So instead of
    <a href="http://www.wordpress.org">Home</a>
    <link href="http://www.wordpress.org/wp-content/themes/mytheme/style.css" />

    I want

    <a href="/">Home</a>
    <link href="/wp-content/themes/mytheme/style.css" />

    From: RFC3986

    A relative reference that begins with a single slash character "/" is termed an absolute-path reference.

    If you read the RFC it makes it clear but basically I use this method so that all of my code isn't hardcoded but can easily be moved to another host.

    This is relevant:
    <?php echo get_settings('siteurl'); ?>

    Help!?

    -CD

  2. icd10
    Member
    Posted 7 years ago #

    Did you try leaving the WordPress address/URL blank?

    (that will only work, I think, if you don't use Permalinks)

  3. AskApache
    Member
    Posted 7 years ago #

    articles-
    No I haven't tried that because I didn't want to go through the trouble of using phpmyadmin to fix the database if the blog stopped working. I'll try it and see if that works.

    And I do use Permalinks.. they are awesome!

Topic Closed

This topic has been closed to new replies.

About this Topic