Basic URL redirect?


#1

Hi!

I’m new to dreamhost, having transferred from another server. Now it’s like shopping in a new store where I’m not quite sure where everything is.

I want to direct (purenoumena.org) to (purenoumena.org/blog) but when I tried to do that it seemed to break the site.

So, I’m wondering,

Where’s the proper place to do this?
and if so, what exactly do I type?

Thank you in advance for any help!

-Jamie


#2

Hi Jamie, welcome to DreamHost :slight_smile:

The easiest way to redirect a domain to a subdirectory is via the “Web Directory” path in Panel.

[color=#00CC00]Panel > Domains > Manage Domains[/color]

  • Click Edit next to purenoumena.org

  • Web directory: /home/username/purenoumena.org/blog

  • Hit the [color=#0000CC]Change settings[/color] button.

Just remember that you’ve done this in case you ever change the way you want the domain to function.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

hi sXi,

Thanks for this, I am having the same problem.

When I made this change it broke the links inside my blog.

Presumably this is because when a link from inside the wordpress app looks for domain.com/blog/whatever it is actually looking at blog/blog/whatever which breaks it.

Is there a way of forwarding that doesn’t break my blog? and that preserves the domain.com/blog structure.


#4

WordPress is really good about using relative paths so this doesn’t happen. Which links are broken? The only path I’ve found in WP is for uploads, and that’s configured in the Dashboard -> Settings -> Misc. There’s a Full path, which you shouldn’t have to change, but there’s also a URL path, which really should be blank as it’s unnecessary if you’ve already specified the Full path.

-Scott


#5

In the WordPress dashboard, check the “Settings -> General” page and make sure you have the “WordPress address (URL)” and the “Blog address (URL)” set correctly.

–rlparker
–DreamHost Tech Support


#6

Thanks.

I ended up using some code I found for a php redirect.

Below is the only code in the index.php file.

<?php header("Location: http://domain.com/blog"); ?>

I’ve read that you can modify the htaccess file to do the same thing also.

I can’t say why making the change suggested broke my blog. There seemed to be some weirdness about the setting which tells the browser to add www. to the address or not. When I have this setting as leave it as it is things went pear shaped. when I set it to add www. it worked…

Regards,
Isaac