Web Design Forum: Base HREF & MAMP question - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting

Quick General Chat Guidelines

Please note: posting of content which is illegal or offensive is not permitted. Be nice and play fair!

Examples of content we don't like: torrents, warez, spam, racism or any form of personal attack. If you aren't sure please ask a mod and we'll be happy to help.

Thanks for reading!
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Base HREF & MAMP question

#1 User is offline   terydinho 

  • Go go gadget xhtml
  • Group: Moderators
  • Posts: 2,795
  • Joined: 08-January 09
  • Reputation: 223
  • Gender:Male
  • Location:East London, UK
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 08 September 2010 - 09:42 PM

At the risk of sounding like a dickhead noob here... can someone explain how I do the following:

I have MAMP running with several sites, usually in wordpress.

I don't want to have to reference every link as:

/site-wp-2/about-this-site


I just want to be able to use:

/about-this-site


But when I do that, it always takes me back to the route of the localhost, not to the root of the site... now this is probably an easy and quick fix, but just one of those things I never knew and never asked about, but as I am doing more and more WP stuff, every time I do it locally, and then move to server, it is a killer to change every single link!!

Cheers
0

#2 User is offline   mrchristoph 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,231
  • Joined: 18-August 09
  • Reputation: 76

Posted 08 September 2010 - 09:58 PM

My be wrong, but I thing you add the following in your wp-config.php:

define('WP_HOME', 'http://site-wp-2.localhost');
define('WP_SITEURL', 'http://site-wp-2.localhost');


...or whatever is appropriate for you.
0

#3 User is offline   terydinho 

  • Go go gadget xhtml
  • Group: Moderators
  • Posts: 2,795
  • Joined: 08-January 09
  • Reputation: 223
  • Gender:Male
  • Location:East London, UK
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 09 September 2010 - 07:08 AM

Unfortunately not mate, because even if I do that, if I have a link that is just

<a href="/">HOMEPAGE</a>


I want that to take me to my site root, not my localhost directory - do you know what I mean?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users