• Resolved studley

    (@studley)


    Hi there,

    Sorry about this, I’m a bit of a beginner, I’ve searched and can’t find the specific answer to this query.

    My (empty) blog is currently at https://www.jukeboxjury.co.uk. I went to Options -> Permalinks, so that I could have yyyy/mm/dd/post-title/, rather than index.php/yyyy/mm/dd/post-title/. However the links don’t work (Page Not Found). I’ve created a blank .htaccess file in my root directory, and I’ve visited Options -> Permalinks again, which updates without any errors, but it doesn’t write anything into my .htaccess file.

    Can someone tell me what I’m doing wrong, or tell me what I need to put in the .htaccess to get this to work? It’s something to do with mod_rewrite but I don’t know anything about .htaccess files?

Viewing 5 replies - 1 through 5 (of 5 total)
  • First make sure mod_rewrite is enabled on your server (ask your host).
    If yes, then make your .htaccess file writable = usually it means chmod 666.
    Try to set your permalinks.

    If your .htaccess is not writable, doesn’t WP display (at the bottom) the code for it when you try to update the Permalink settings?

    Thread Starter studley

    (@studley)

    I made my .htaccess unwritable and it gave me the code that I need to put in the file. I inserted that code, but the redirects still don’t work. Does this suggest that mod_rewrite is disabled?

    I’ll check with my host, but what’s the best way around this if I don’t have mod_rewrite access?

    Thread Starter studley

    (@studley)

    OK, this was the reply that I got from my webhost:

    While we do support .htaccess files, much of the mod_rewrite functionality is not available.

    However, you can use Zeus rewrite rules which work in a very similar way. For example, a mod_rewrite rule of:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^[^/]*\.html$ index.php

    Would convert to:

    match URL into $ with ^[^\/]*\.html$
    if matched then
    set URL = index.php
    endif

    This should be placed in a file named rewrite.script in your web directory.

    Bearing in mind that this is the htaccess code that WP generated for me:

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

    …what do I need to put in the Zeus file? I tried copying their example exactly, but that didn’t work.

    I’m having the exact same problem. Looks like this page might be helpful: https://gallery.menalto.com/node/32467

    I haven’t had a chance to adapt what’s on that page (it’s about a similar problem for some photo gallery app) to match WordPress yet, but will post back here if I can get it to work.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    This should prove useful: https://drupal.org/node/46508

    While it’s not a perfectly exact match, it should be a lot more straightforward to modify this into a working script for WordPress.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘What do I need to put in my .htaccess file?’ is closed to new replies.