Forums

having problem changing permalinks (20 posts)

  1. webtodd
    Member
    Posted 6 years ago #

    i have followed the instructions on changing permalinks...

    basically i did the chmod 666 to .htaccess, then logged into my wordpress admin and tried to change the permalinks. the links changed on my site, but they are all broken?

    maybe the .htaccess did not get updated? is there some way to grab the code and manually modify my .htaccess?

  2. Kafkaesqui
    Moderator
    Posted 6 years ago #

    You first should check with your host and make sure they fully support mod_rewrite and .htaccess on their servers.

  3. webtodd
    Member
    Posted 6 years ago #

    yes, host fully supports both.

  4. r-hold
    Member
    Posted 6 years ago #

    I have the same problem. This is what i've figured out so far:

    1. WP has write access to the .htaccess file (I can edit it via the webinterface and it actualy changes on the disk)
    2. If i select a new permalink structure via the web-panel the old .htaccess file is overwritten by a new one but the content is always the same regardles of what i select:
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /r-hold/duett/
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /r-hold/duett/index.php [L]
      </IfModule>

      # END WordPress

      I am no rewrite expert but this looks a little slim to me...

    3. My rewrite-log always says ... pass through ... there is no rewriting done at all (no big surprise...)
  5. r-hold
    Member
    Posted 6 years ago #


  6. Chris_K
    Member
    Posted 6 years ago #

    It should be slim. WP2.x handles most of the rewriting internally.

    If you're dying to see all of what WP is doing, check out this handy-dandy little plugin: http://www.dagondesign.com/articles/wordpress-internal-rewrite-viewer-plugin/

    [edit]
    Forgot this useful codex link!
    http://codex.wordpress.org/Permalinks#Fixing_Permalink_Problems

  7. webtodd
    Member
    Posted 6 years ago #

    r-hold, are you having this problem still? if you figure it out, let me know! i can't start adding posts to my blog until i get this permalink problem straightened out. right now i'm stuck with the default structure.

  8. r-hold
    Member
    Posted 6 years ago #

    O.k. Problem solved for me:
    It was a misconfiguration in the apache server.
    The AllowOverride All directive was not set for the right Directory.

  9. webtodd
    Member
    Posted 6 years ago #

    i don't think my .htaccess file is getting updated correctly, and i'm struggling to figure out why?

    is there someplace to grab the code within the wordpress admin so i can manually update the .htaccess file?

  10. Chris_K
    Member
    Posted 6 years ago #

    Yes webtodd. Right there on the Permalinks page (Options -> Permalinks). Scroll down a bit.

    Check out the link I posted here, in this thread, earlier today about trouble-shooting permalinks.

  11. webtodd
    Member
    Posted 6 years ago #

    thanks handysolo, i'll check both of those options

  12. webtodd
    Member
    Posted 6 years ago #

    i did these two steps as listed at codex, and still having problems
    --
    1. Change File Permissions: You must chmod the .htaccess file to 666 to edit it with the WordPress template editor, but this is not recommended, since if you do that, any user of your blog, who can edit templates will be able to edit it. You can change the permissions to 660 to make it server-writable, which again will have the same limitation.

    2. Server Blockage: Your host might have blocked the SERVER_SOFTWARE variable and this will cause WordPress' .htaccess generation to fail. If you are sure that your server is running Apache, you can force WordPress to believe that your server is running Apache by changing your wp-includes/vars.php file. Follow the steps below to implement these changes.
    1. Open the wp-includes/vars.php file using the built in file editor in your WordPress Admin panel. To navigate to this panel, login to WordPress, click on "Manage", then on "Files", scroll to the bottom and type in wp-includes/vars.php into the text box under the "Other Files" title.
    2. Look for $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;, once you find it replace it with // $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
    3. Add a new line under // $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0; and type in $is_apache = 1;

  13. Chris_K
    Member
    Posted 6 years ago #

    what is currently in your .htaccess?

  14. webtodd
    Member
    Posted 6 years ago #

    currently:

    --

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

  15. Chris_K
    Member
    Posted 6 years ago #

    And you've confirmed that mod_rewrite is "on" for your host. Did you also confirm, from the trouble shooting link I gave you, that they've actually turned on AllowOverride?

  16. webtodd
    Member
    Posted 6 years ago #

    let me double-check on those...thanks HandySolo!

  17. webtodd
    Member
    Posted 6 years ago #

    i just got off the phone with my host and they told me they don't support AllowOverride?

    so... i could use a recommondation for a hassle-free host that i could use to host my wordpress blog? any suggestions anyone?

  18. Chris_K
    Member
    Posted 6 years ago #

    Bummer. One option would be to include "index.php" at the start of your permalinks (use the custom field). Something like:
    /index.php/%year%/%monthnum%/%day%/%postname%/

    If that's not desirable, do some searching here in the forums for host options. There have been a few threads in the last couple months.

  19. webtodd
    Member
    Posted 6 years ago #

    cool thanks, i think my host sucks anyways, so i dont mind finding a new one.

  20. sogroovynow
    Member
    Posted 5 years ago #

    I am having this problem. I am at the above link that HandySolo provided, at step 2:

    Look for $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;

    I do not have that in my vars.php. This is what is listed on mine:

    $is_apache = ( strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') || strstr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') ) ? 1 : 0;

    Is this the line I need to replace? Or should I not change it? Thanks. I am having tons of problems with changing my permalink structure from default to "pretty" and I'm afraid my website host is the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.