OpenX WordPress Redirect Issue

Published by John on August 21, 2012 Under OpenX

While installing OpenX on a website alongside WordPress, I ran into a few issues with redirects and 404s.

Specifically, when visiting certain pages, like OpenX Plugin Pages and Menu Pages, I was getting wordpress 404 errors, instead of being able to view the actual page. I also was not able to view ads from new Zones that I had created, as well as a few redirect issues.

My initial thought was that perhaps WordPress’s .htacess redirect was acting up and that I should try to disable the redirect for the OpenX directory. However in general the wordpress .htaccess code is intended to not interfere with actual files and I was getting a 404 when attempting to load files that I knew were present.

The Problem and Solution:

After a bit of checking, I determined that some of the files in the OpenX installation had their permissions set to 777, which is full access.

I changed the folders to 755 and the files to 644 and I was able to see adverts again, as well as visit all of the OpenX Dashboard pages.

Set Permissions using Find:


cd ~/public_html/openx_directory
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

Explanation:

– Login via SSH and change to the openx directory, in this example ‘~/public_html/openx_directory’
– The next two commands use ‘find’ to find directories and files respectively, changing their permissions to 755 and 644.

Note that OpenX might require write permissions on certain folders/files, so depending on how your web server is setup, you may need to go in and individually change permissions back on certain folders. If you are getting errors at login, you see this post to try to identify what folders are incorrectly set.


No Comments |

Add a Comment