Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter jaced

    (@jaced)

    Handy,

    So is it a process of opening the db up in a text editor, selecting a chunk of it, CUTTING it from the db file, Pasting it into the SQL query form field of phpMyAdmin, clicking Go, waiting until it sticks, and then doing it again with a second chunk?

    The second chunk doesn’t overwrite the first chunk?

    Thx.

    OK, I think I’ve got it.

    To recap, I had a unique need. My blog resides at https://example.com/blog. I wanted to move my Blog Address to the root without cluttering up the root with files.

    The second part of my need was that I need to redirect existing Google traffic, which point to https://example.com/blog, to the new location in the root.

    The problem was that if I used a 301 redirect in the /blog/.htaccess file, my wp themes and admin wouldn’t be found, since the .htaccess was redirecting me to the root. A unique situation.

    The trick was to create a second subdirectory for the core files, and reserve the /blog directory for nothing more than the 301 direct. Here’s the riff:

    First, create a new folder /wp and copy everything into that. See this:

    https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory

    Then copy the index.php and .htaccess to the root. Tweak the index.php file according to the instructions.

    Log in to the admin panel as instructed and change the Options accordingly to make https://example.com/wp the WordPress Address, and https://example.com the Blog Address.

    Now your core files are in /wp, and your Blog Addy is in root. But your old links to https://example.com/blog are throwing up a 404. You need a 301 Redirect in the /blog/.htaccess file. Use 4evrblu’s instructions here:

    https://www.ads-software.com/support/topic/99272?replies=12

    That should do it. You’ve now moved your Blog address out of /blog to the root, you’ve transferred your core files to /wp to avoid root clutter, and you’re redirecting existing traffic from /blog to the root. Dancing.

    Hmm, something occured to me.

    Since the /blog/.htaccess 301 redirect is conflicting with my ability to access the admin panel, perhaps I could create a second directory (such as /wp, for example). I then move my core files to /wp, keeping index.php and .htaccess in root. My wordpress addy would then be https://example.com/wp/, my blog addy would be https://example.com.

    The only purpose of the /blog directory would be to redirect existing traffic.

    Sound good? Handy?

    So I slept on this and woke up realizing I need to choose between the lesser of two evils:

    1. Move my blog to the root while keeping my core files out of the way (in /blog), and find a way to live with the idea that all traffic directed from google (to my old links) will throw up a 404.

    2. Move all my core files from /blog to the root, live with the clutter, and set up the 301 redirect in /blog/.htaccess

    Neither of these sounds particularly appealing. Let me know if I’m overlooking a better option. Thx.

    Hi Handy,

    Indeed I have. I’ve been reading through all these forums and I think I may have run into something unique. I have two distinct things I need to do, and they seem to be incompatible with one another.

    My problem’s not about getting WP into its own directory. That works fine. The problem is getting my existing (Google) links to redirect to the new location.

    My blog’s currently in a subdirectory, and I want it in the root. I’ll break it down real quick:

    1. My blog has been in https://example.com/blog/

    So I’m halfway there, right? That is, my core files are ALREADY in another location.

    2. I want to have my blog answer to https://example.com

    OK, now, the thread you speak of outlines this clearly, but it’s somewhat backwards from my set-up. In my situation, my files are ALREADY in a new location other than the root. So I’m good to go. What I did is simply copy my index.php and .htaccess files to the root, tweak the index.php file as instructed, and I was off and rolling. On the surface.

    The problem:

    My old links, such as https://example.com/blog/archive/article

    now throw up a 404 error.

    So I’m faced with looking into a proper redirecting solution. I’ve looked at tweaking the /blog/.htaccess file to do a 301 redirect. I’ve done so per this thread:

    https://www.ads-software.com/support/topic/99272?replies=8

    …and things work fine on the surface.

    However, MAJOR PROBLEM:

    The 301 redirect in the /blog/.htaccess file is now doing two significantly bad things to me:

    1. My themes aren’t found. i.e. going to https://example.com throws up the blog content, but no skin.

    2. I can’t get into the admin panel. i.e. going to https://example.com/blog/wp-login.php kicks me into another 404 situation, since the .htaccess is effectively redirecting me to the root, and wp-login.php doesn’t reside there.

    So to recap, there’s a conflict between:

    a) The idea of keeping WP core files in the old subdirectory below the root,

    and

    b) using a 301 redirect in the old subdirectory’s .htaccess file to redirect existing traffic to the new location at the root.

    Does this make sense? Seems so obvious, but I can’t seem to find anybody else who’s had this situation.

    I’m beginning to realize that perhaps I need to physically move my core files to the root, which makes me unable to take advantage of the abilitites described in the thread you mention.

    Thanks dude.

    Guys,

    The 301 redirect seems to conflict with the notion that we can store our core WP files in a different location that our blog address.

    When we tweak .htaccess to redirect anything, we’re basically hosing ourselves. WP can’t find themes, nor can it get to the admin.

    I can’t be the only dude who’s wrestled with this. What’s going on? Must I actually move the core files to the root?

    Seems that if we do indeed want to move our WP files to another directory, we can. The catch: all our existing links turn up 404.

    Thread Starter jaced

    (@jaced)

    Guys,

    The 301 redirect seems to conflict with the notion that we can store our core WP files in a different location that our blog address.

    When we tweak .htaccess to redirect anything, we’re basically hosing ourselves. WP can’t find themes, nor can it get to the admin.

    I can’t be the only dude who’s wrestled with this. What’s going on? Must I actually move the core files to the root?

    Seems that if we do indeed want to move our WP files to another directory, we can. The catch: all our existing links turn up 404.

    Thread Starter jaced

    (@jaced)

    Thanks.

    Thread Starter jaced

    (@jaced)

    Pizdin,

    What I’m trying to do is retain all my established links in Google. I tried using the Redirect in the /blog/.htaccess to do this.

    Is there a better way to redirect old links to the new links? As of right now, all my links from Google are going to a 404 page.

    Thx.

    Thread Starter jaced

    (@jaced)

    OK, I dicked around with the /blog/.htaccess file and got https://example.com/blog/path to redirect to https://example.com/path by putting this in the /blog/.htaccess file:

    Redirect /blog/ https://example.com/

    Seemed cool, but then weird stuff started happening. Namely:

    — The theme eventually disappeared. Content was there, but with no skin.

    — Couldn’t get into the wp-login.php file. This is probably because /blog/wp-login.php is redirecting me to a non-existent /wp-login.php

    Hmmm.

    Lemme know what you think the best option is.

    Thread Starter jaced

    (@jaced)

    Hey Moshu, you rock.

    The htaccess redirect you speak of would be the one in the /blog directory, right? Perhaps some htaccess guru can jump into this convo. ??

    Also, I should be COPYing the index.php and htaccess files in to the root, NOT MOVING them, correct? Leaving two sets of each?

    One more quick question: none of these moves would affect my ability to access the admin panel, right?

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)