Forums

Permalinks problem (14 posts)

  1. builders
    Member
    Posted 4 months ago #

    Hello
    I don't know why, if I click on a post title, it takes me to the main page. I have tried to change the setting :
    Default http://robuild.co.uk/?p=123
    Day and name http://robuild.co.uk/index.php/2012/01/17/sample-post/
    Month and name http://robuild.co.uk/index.php/2012/01/sample-post/
    Numeric http://robuild.co.uk/index.php/archives/123

    When I change from default to other options, it takes me to a page that doesn't exists.The blog address is http://robuild.co.uk/blog/

    Thank you in advance for your help.

  2. builders
    Member
    Posted 4 months ago #

    Basically , If I don't use the Default option, the blog disappears and with the Default option, if I click on the Post title, it takes me to the home page.

  3. Roy
    Member
    Posted 4 months ago #

    What do you have for URL settings? (Settings->general I believe.)

  4. builders
    Member
    Posted 4 months ago #

    WordPress address (URL) http://robuild.co.uk/blog
    Site address (URL) http://robuild.co.uk

  5. Roy
    Member
    Posted 4 months ago #

    Ah, that can't be right. When the WP files are in the /blog folder, both need to be /blog.

    If you want to get rid of /blog, you'll need to do a bit more:
    http://codex.wordpress.org/Moving_WordPress

  6. builders
    Member
    Posted 4 months ago #

    I want to keep the blog, but when I click on a post title, it takes me to the home page. Thanks

  7. Roy
    Member
    Posted 4 months ago #

    Make both setting http://robuild.co.uk/blog

  8. builders
    Member
    Posted 4 months ago #

    ok, I ll do that now.

  9. builders
    Member
    Posted 4 months ago #

    It doesn't work, not it just takes me to the blog home page

  10. Roy
    Member
    Posted 4 months ago #

    That's more like it, eh?

    [edit] it works for me now.

  11. builders
    Member
    Posted 4 months ago #

    What could be wrong ?

    [No bumping. If it's that urgent, consider hiring someone.]

  12. Roy
    Member
    Posted 4 months ago #

    Did you change the settings back? It worked an hour ago.

  13. builders
    Member
    Posted 4 months ago #

    Hi Roy
    I spoke to the host, perhaps it will help others in the future, this is the email I've got from them. Personally, I don't know how to create the file.

    Unfortunately, mod_rewrite is not available on our hosting packages as this is a module for Apache servers and we run Zeus. We do however, offer an alternative, more powerful rewrite facility on all of our Linux hosting packages.

    The Zeus Rewrite functionality works in a similar way but has a slightly different syntax. Simply create a file called 'rewrite.script' in your web directory and enter your rewrite rules.

    RULE_0_START:
    # get the document root
    map path into SCRATCH:DOCROOT from /
    # initialize our variables
    set SCRATCH:ORIG_URL = %{URL}
    set SCRATCH:REQUEST_URI = %{URL}

    # see if theres any queries in our URL
    match URL into $ with ^(.*)\?(.*)$
    if matched then
    set SCRATCH:REQUEST_URI = $1
    set SCRATCH:QUERY_STRING = $2
    endif
    RULE_0_END:

    RULE_1_START:
    # prepare to search for file, rewrite if its not found
    set SCRATCH:REQUEST_FILENAME = %{SCRATCH:DOCROOT}
    set SCRATCH:REQUEST_FILENAME . %{SCRATCH:REQUEST_URI}

    # check to see if the file requested is an actual file or
    # a directory with possibly an index. do not rewrite if so
    look for file at %{SCRATCH:REQUEST_FILENAME}
    if not exists then
    look for dir at %{SCRATCH:REQUEST_FILENAME}
    if not exists then
    set URL = /index.php?q=%{SCRATCH:REQUEST_URI}
    goto QSA_RULE_START
    endif
    endif

    # if we made it here then its a file or dir and no rewrite
    goto END
    RULE_1_END:

    QSA_RULE_START:
    # append the query string if there was one originally
    # the same as [QSA,L] for apache
    match SCRATCH:ORIG_URL into % with \?(.*)$
    if matched then
    set URL = %{URL}&%{SCRATCH:QUERY_STRING}
    endif
    goto END
    QSA_RULE_END:

  14. builders
    Member
    Posted 4 months ago #

    Can anyone delete the links please ?Thanks in advance

Reply

You must log in to post.

About this Topic