Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

WTH have I broken now?

Status
Not open for further replies.

Systreg

Staff member
Joined
Oct 13, 2008
Posts
8,114
Reaction score
666
[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:

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.

Normally you should not edit the htaccess, the Permalink link will be detect by plugin automatically.
The htaccess is a way to add the category name to the url or display the post title in the blog url.

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 . /index.php [L]
RewriteRule !^(classified|odlinks)/ /index.php [L]
RewriteRule odlinks/([^/\(\)]*)/?([^/\(\)]*)/?([^/\(\)]*)/? /index.php?pagename=odlinks [QSA,L,R,NS]

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:

# 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>

# END WordPress

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:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule !^(classified|odlinks)/ /index.php [L]
RewriteRule odlinks/([^/\(\)]*)/?([^/\(\)]*)/?([^/\(\)]*)/? /index.php?pagename=odlinks [QSA,L,R,NS]

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

# END WordPress

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:
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:

Your file /home/MYUSERNAME/public_html/MYDOMAIN.co.uk/.htaccess has been saved.

Is that 'home' or 'public_html' the same as root?
 
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:
 
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:

ORIGINAL:
# 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>
# END WordPress

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: :)
 
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:

# 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>

# END WordPress

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

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 . /index.php [L]
RewriteRule !^(classified|odlinks)/ /index.php [L]
RewriteRule odlinks/([^/\(\)]*)/?([^/\(\)]*)/?([^/\(\)]*)/? /index.php?pagename=odlinks [QSA,L,R,NS]

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:
 
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:

Three things you need to do.
Set your permalink first.
I Use:
/%postname%/%category%/%post_id%

Mine is already set to /%postname%/

Next go to ODLINK Settings
Change your Slug and Page name to the same name.
I Use:

link-directory

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

Log out of wordpress.

Done.

Now edit your .htaccess file.
Here is my file.

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

# END WordPress

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

You have to change every odlink to your new slug and page name.

Not sure what this means, what page names?

Now Stay out of odlinks and permaslinks as they will want to rewrite the .htaccess every time there is an update.

Go to your site and click on the link-directory.

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:

You have to change every odlink to your new slug and page name.

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:
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom