Domain Manage

WTH have I broken now?

Discussion in 'Wordpress' started by Systreg, Apr 9, 2011.

Thread Status:
Not open for further replies.
  1. Systreg

    Systreg Well-Known Member

    Joined:
    Oct 2008
    Posts:
    6,586
    Likes Received:
    96
    [edit] Ignore all this topic, I've now deleted the business directory plugin that the topic is about.

    Ok, the other day I installed a business directory WP plugin on my site, it worked fine, some local businesses started adding links, I just noticed today that when looking at any of the listings, it says 404 page does not exist, tried the submit listing and get the same.

    So, I went to the site of the person who makes the plugin, and they have a section here called Q. Why the main site gives me the 404 or Not Found error message or I cannot see the “Submitt a link”?

    http://www.forgani.com/tools/opendirectorylinks

    It give directions to change htaccess file like this:

    I'm not sure what I've done, I went to my webhost control panel and used the search function to find htaccess for my site, and I went to edit it, the htaccess file originally had this code in the file:

    So, I took these 2 lines from the plugin authors site and pasted them in to make it look like this, I've highlighted what I added:

    I saved that and my site loaded but had some images missing, I refreshed the page and then it was as if the site had no .css or style on it, so I edited the htaccess file again to make it like it was before I edited it, now the site doesn't work at all, it just gives a white page saying internal server error :confused:

    What have I done and how do I fix it?
     
    Last edited: Apr 9, 2011
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
     
  3. Systreg

    Systreg Well-Known Member

    Joined:
    Oct 2008
    Posts:
    6,586
    Likes Received:
    96
    Just to add, in the previous post, it says change the file in root, well I don't know where that is as I can't see a section called root, so when I clicked to open the htaccess file that the search results gave me for this domain, after editing and saving it, it says:

    Is that 'home' or 'public_html' the same as root?
     
  4. Systreg

    Systreg Well-Known Member

    Joined:
    Oct 2008
    Posts:
    6,586
    Likes Received:
    96
    Site now back online, thanks to the help from Malcolm (mbignell) via PM, top man :)
     
  5. Systreg

    Systreg Well-Known Member

    Joined:
    Oct 2008
    Posts:
    6,586
    Likes Received:
    96
    Bollox, sorry Malcolm, just went to leave you some rep and gave you negative rep by mistake, and it wont let me give you positive now, so you've gone red :mad:, I will PM admin, sorry :oops:
     
  6. Systreg

    Systreg Well-Known Member

    Joined:
    Oct 2008
    Posts:
    6,586
    Likes Received:
    96
    Just to show what a numpty I am and why I should never, ever, touch anything remotely techy to do with the working of files and folders etc, Malcolm informs me that the reason the htaccess file stopped working and made my site crash, was because it said this in the file when he checked it:

    Note the word ORIGINAL, well, before I edited the htaccess file code, I saved it to notepad in case I made a mistake and needed to change it back to the original code that was in it, and above it on notepad I wrote, ORIGINAL:, so I would know that was the original code, but somehow I pasted that in to the file and saved it without realising I had included the word in it :oops: :)
     
  7. Systreg

    Systreg Well-Known Member

    Joined:
    Oct 2008
    Posts:
    6,586
    Likes Received:
    96
    Now the site is back online, this still leaves me with my initial problem with the WP business directory plugin not working, the htaccessfile has this code:

    And the business directory plugin author suggests this to solve the problem with the directory now not working:

    What part of that ^^^ do I add the the htaccess file, do I put it all in, is that # tag supposed to be there at the start of the first line? Do I remove all of the code from the original htaccess file and replace with just those 3 lines above, any idea? :confused:
     
  8. seemly

    seemly Active Member

    Joined:
    Feb 2011
    Posts:
    973
    Likes Received:
    39
    Im not really that great at .htaccess by any means, but I will try to help where I can.

    the '#' basically makes a line not do anything. In technical terms, it allows the developer to comment his code so it makes sense with what is going on when they revisit at a later date.

    # RewriteRule . /index.php [L]
    So this is effectively a comment telling you/the developer that /index.php should not display and that the root (www.yoursite.com) should display in the URL bar instead. The [L] tells the script that this line of code should stop here and not continue.

    Beyond that, I think the script is communicating with the plugin.

    In order to get your script to work, this is the full htaccess code in it's entirety:

    Code:
    # 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>
    
    # RewriteRule . /index.php [L]
    RewriteRule !^(classified|odlinks)/ /index.php [L]
    RewriteRule odlinks/([^/\(\)]*)/?([^/\(\)]*)/?([^/\(\)]*)/? /index.php?pagename=odlinks [QSA,L,R,NS] 
    
    # END WordPress
    
    Notice that your new piece of code needs to sit outside of:

    <IfModule> and it's closing </IfModule>.
    This "if module" is a script running for something completely different and is it's very own independant script and should not be touched. ;)

    I hope this helps. It should work. If not, gimme a shout! :D
     
  9. Systreg

    Systreg Well-Known Member

    Joined:
    Oct 2008
    Posts:
    6,586
    Likes Received:
    96
    Hi Steely,

    No mate, didn't work unfortunately, makes the site come up as if there is no style sheet on it.

    Malcolm came up with this link that might help, see the 4th post:

    http://wordpress.org/support/topic/need-help-setting-my-htaccess-file-for-odlinks

    It doesn't seem to work they way they say on that link, either that or I'm doing something wrong, hmmm:

    Mine is already set to /%postname%/

    Went to setting and changed both slug and names to business-directory and Business Directory.

    Done.

    I use all of that ^^^ code and changed his link-directory to business-directory.

    Not sure what this means, what page names?

    I go back to the site, click directory, then click on say the submit new ad link and it takes me to a HostGator 404 error page, so it must be something to do with the other thing above where they say:

    I've just been through the WP control panel and looked in posts, pages and categories and there is nothing relating to odlinks, so what slug and page names are they talking about :confused:

    Feck it, really had enough now, deleting all this plugin crap, I'm just sitting here shouting at the computer and getting wound up.

    I do like WP but it's a friggin nightmare getting stuff to work, for example, I put a ClassiPress directory on my campervan site

    I went to install that same directory theme on this site I'm working on now, I spent 8 hours pissing about trying to get it to work, uninstalling and reinstalling several times and setting up the multitude of settings that ClassiPress has, but it wouldn't work.

    It must be something to do with the new version of WP that has been released, and the camper vans site hasn't been update to the new version of WP yet, otherwise that wont work either, WP is a bloody pain a lot of the time, I want to get things done be keep hitting friggin walls :mad:

    Have now deleted this plugin, thanks for the help/advice, but it looks like this plugin is a non starter so now worth wasting further time on.

    So what to use for a business directory, musy be something out there as there are loads of directory sites, can't find anything in Google to use, though.
     
    Last edited: Apr 9, 2011
  10. seemly

    seemly Active Member

    Joined:
    Feb 2011
    Posts:
    973
    Likes Received:
    39
    Just thought I would ask, but you definitely replace all instances of "link-directory" with "business-directory"?

    If you say your old campervan site works and it uses a directory plugin, but is using an older version of wordpress, maybe it's worth deleting the version of wordpress and it's database on the site you are struggling with and download and install a version of wordpress you know works?

    http://wordpress.org/download/release-archive/

    A bit of a shit option, but at least it is an option? :(
     
Thread Status:
Not open for further replies.

Share This Page