.htaccess file - I have a wee problem with it :(

8 replies
I have to change the .htaccess file to make a wp plugin function.The creator of the plugin hasn't been specific about what part of the code, he has suggested using, should be pasted in.

This is his instruction:

An example for htaccess code to redirect to odlinks You need an .htaccess file. The file will be create/modify by wordpress via the Permalink/mod-rewrite option.

Please edit the .htaccess file in the root folder of your Wordpress.


You use the default .htaccess file and modify the file as follow:
The redirect should look something like this

RewriteRule

!(classified|odlinks)/ /index.php [L]
RewriteRule ^odlinks/([^/

\(\)]*)/?([^/\(\)]*)/?([^/\(\)]*)/? /index.php?

pagename=odlinks&_action=$1&id=$2&parent=$3 [QSA,L,R,NS]

so what I did was to paste it in like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule !^(classified|odlinks)/ /index.php [L]
RewriteRule odlinks/([^/\(\)]*)/?([^/\(\)]*)/?([^/\(\)]*)/? /index.php?pagename=odlinks&_action=$1&id=$2&parent =$3 [QSA,L,R,NS]
</IfModule>

# END WordPress

Now my site looks like this: | mylink2.com

Can someone help me with the correct code to get this plugin to make the link directory work as it should. Here is the creators site showing you what the link directory should look like: forgani.com

I hope this all makes sense

Cheers
Viv
#file #htaccess #problem #wee
  • Profile picture of the author Mickm
    I think this is a problem with your permalink structure, firstly make a back up of your .htaccess before you try this ok?

    OK. Make sure your .htaccess is writable with chmod.

    In Wordpress go to your permalinks option and select custom and use this:
    %category%/%postname%

    If that doesn't work drop me a pm and I'll install the plug in on one of my sites, get it working then show you how I did it.

    Good luck.
    {{ DiscussionBoard.errors[613712].message }}
    • Profile picture of the author mistyone
      Originally Posted by Mickm View Post

      I think this is a problem with your permalink structure, firstly make a back up of your .htaccess before you try this ok?

      OK. Make sure your .htaccess is writable with chmod.

      In Wordpress go to your permalinks option and select custom and use this:
      %category%/%postname%

      If that doesn't work drop me a pm and I'll install the plug in on one of my sites, get it working then show you how I did it.

      Good luck.
      Hi Mike

      Thanks for that bit of advice on the permalink. I changed it to this: /%category%/%postname% /

      So now when you click on a category it takes you to a page that says there are no posts, so I presume when some listings are added it won't say that.

      Sometimes clever people are not very good at relaying information in a manner that others, less intelligent will understand and he has had me totally floundering I still can't find the 'submit a link' a pretty crucial thing really :rolleyes:

      Your offer of installing the plugin on one of your sites getting it going and then showing me how you did it was very kind, thank you. Maybe I will take you up on that offer if I can't get it to work properly. Any suggestions about the 'submit link' function?

      Cheers
      Viv
      {{ DiscussionBoard.errors[613758].message }}
  • Profile picture of the author mistyone
    I just had a thought about what I could remove to get it to return my site to normal and I removed the ( )'s and the word 'classified' out of this line:
    RewriteRule !^(classified|odlinks)/ /index.php [L] and the site is now out of error BUTTTTT I still have a problem. When you click on a category it takes you to a post I think it has to do with the way I have set up the categories but I am actually not sure how I am meant to set them up.

    This is his instructions:

    Go to create and modify your Categories and Sub Categories under "ODLINKS Structure"
    You will need to make the Smarty cache folders writable (chmod 777) :

    ./odlinks/includes/Smarty/cache
    ./odlinks/includes/Smarty/templates_c
    I have done this

    Create some child category. It is not possible to post to the parent category.
    I created a category and called it 'odlinks'

    Why the main site gives me the 404 or Not Found error message or I cannot see the "Submitt a link"?
    I can't find the submit link

    This usually occurs only when using a custom permalink structure (like /%category%/%postname%/).
    This is a .htaccess 404 error message and you should update your .htaccess file in the WP root directory.

    when I changed the permalink to default, the site went into the 404 error so I changed it back to this again: /%postname%/

    I am truly stuck with this and even though I have sent off an email to the creator, he hasn't responded and doesn't appear to be responding to anyone. His contact link in wordpress.org, where his plugin is advertised for download, returns a 404 as well so I am forced to try to work these problems out myself

    Any help will be very much appreciated

    Cheers
    viv
    {{ DiscussionBoard.errors[613717].message }}
  • Profile picture of the author Dave OSullivan
    Viv,

    I installed the plugin v.1.0.1-a on a test blog I use here xe54.com and it went with no hitches, I didn't have to modify the .htaccess file.

    I notice on yours that it is also in a category and am just wondering if that has something to do with it?

    Try uninstalling the database from the ODLINKS utilities link, then reactivate the plugin, save the settings under ODLINKS settings before adding anything and go from there.

    If you want me to have a go, PM me some temp login details for your blog admin.

    Dave.
    {{ DiscussionBoard.errors[620771].message }}
  • Profile picture of the author bobspanner
    I don't suppose you came across another issue with the search not working I am getting no response from creator either. Thanks for the answers here for the mod rewrite

    For me the search does not work. When I search the links for keywords that are in the description nothing happens. Any help or suggestions would be most gratefully received. informativedirectory.co.uk
    {{ DiscussionBoard.errors[744771].message }}
    • Profile picture of the author mistyone
      Hi there

      I have just checked my search box and I found something very interesting The google ads changed to reflect my keyword. Does yours do that?

      Sorry but I don't know why this is happening. I am pretty green with this sort of thing that is why I ended up with Dave helping me out
      {{ DiscussionBoard.errors[744862].message }}
      • Profile picture of the author dadida
        Hi, try this

        change:
        RewriteRule ^odlinks/([^/()])/?([^/()])/?([^/()]*)/? /index.php?pagename=odlinks&_action=$1&id=$2&parent =$3 [QSA,L,R,NS]

        to:
        RewriteRule ^odlinks/([^/\.]+)/?([^/\.]+)/?([^/\.]*)/? /index.php?pagename=odlinks&_action=$1&id=$2&parent =$3 [QSA,L,R,NS]
        {{ DiscussionBoard.errors[759084].message }}

Trending Topics