SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot tim@getdim's Avatar
    Join Date
    Jul 2012
    Location
    Detroit
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation permalink problem or something else?

    Ok my wordpress files are in a subdirectory (example.com/blog)
    I am ready to make this live.
    I follow the instructions in the codex (as i have done a dozen times before)
    copy index and .htaccess from subdirectory root level.
    change the reference to blog header in the root level index file (to ./blog/wp-blog-header.php).
    in general settings change site URL to example.com and leave wordpress URL as example.com/blog
    set permalink settings to %postname%.
    yadda yadda blah blah. i know i did all that right.

    the .htaccess file looks like this:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    everything is working fine, except that when i navigate to my about or contact pages i get a 404 error.
    its looking for about.html and contact.html - which it should not be doing.

    ive tried resetting permalinks.
    ive checked the page slugs, as far as i can tell everything is exactly as it should be, so why are these two pages not working?

    when i put the original html site back up and wordpress is only in the subdirectory (/blog) these pages work fine.

    so in short when the site URL is example.com/blog everything works fine. but when i change things over and site URL is rewritten to example.com about and contact dont work.

    the only solution im coming up with is to move all wordpress files to the root directory and rewrite the urls in the SQL.
    but this is a pain in the **** and less secure.

    I figure there has to be a better way, and if any online community can help me, its you people

  2. #2
    SitePoint Zealot tim@getdim's Avatar
    Join Date
    Jul 2012
    Location
    Detroit
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Found a fix

    Still have no idea what the original problem was but i copied the content of the about and contact pages and made new pages (instead of /about its now /about-us and same for contact)

    i would still like to know how this problem might have occurred in the first place, if anyone has any thoughts.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •