kfordham281 Posted September 3, 2005 Share Posted September 3, 2005 Question for the crew on the boards here.... I just installed Wordpress and everything was working fine until I changed the permalink structure and now basically when I click on anything I get a 404 error.....any ideas? http://www.cpadventures.com/blog Any help would be appreciated! Thanks, Kevin Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted September 3, 2005 Share Posted September 3, 2005 How did you change your permalink structure? Did you copy and paste the entries WP created into your .htaccess file? Quote Link to comment Share on other sites More sharing options...
kfordham281 Posted September 3, 2005 Author Share Posted September 3, 2005 (edited) Of course by default the permalink structure is blank when you install WP, now it is: Structure: /%year%/%monthnum%/%day%/%postname%/ When I first did this, I only changed .htaccess to add "RewriteEngine On". But later I noticed that right below in the same admin page of WP it had a whole bunch of stuff that it told me I needed to add, which I did. I added the following: >RewriteEngine On RewriteBase /blog/ RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [S=35] RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?&feed=$1 [QSA,L] RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?&feed=$1 [QSA,L] RewriteRule ^page/?([0-9]{1,})/?$ /blog/index.php?&paged=$1 [QSA,L] RewriteRule ^comments/feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?&feed=$1&withcomments=1 [QSA,L] RewriteRule ^comments/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?&feed=$1&withcomments=1 [QSA,L] RewriteRule ^comments/page/?([0-9]{1,})/?$ /blog/index.php?&paged=$1 [QSA,L] RewriteRule ^search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?s=$1&feed=$2 [QSA,L] RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?s=$1&feed=$2 [QSA,L] RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /blog/index.php?s=$1&paged=$2 [QSA,L] RewriteRule ^search/(.+)/?$ /blog/index.php?s=$1 [QSA,L] RewriteRule ^category/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?category_name=$1&feed=$2 [QSA,L] RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?category_name=$1&feed=$2 [QSA,L] RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ /blog/index.php?category_name=$1&paged=$2 [QSA,L] RewriteRule ^category/(.+)/?$ /blog/index.php?category_name=$1 [QSA,L] RewriteRule ^author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?author_name=$1&feed=$2 [QSA,L] RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?author_name=$1&feed=$2 [QSA,L] RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /blog/index.php?author_name=$1&paged=$2 [QSA,L] RewriteRule ^author/([^/]+)/?$ /blog/index.php?author_name=$1 [QSA,L] RewriteRule ^([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?year=$1&feed=$2 [QSA,L] RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?year=$1&feed=$2 [QSA,L] RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /blog/index.php?year=$1&paged=$2 [QSA,L] RewriteRule ^([0-9]{4})/?$ /blog/index.php?year=$1 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /blog/index.php?year=$1&monthnum=$2&paged=$3 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /blog/index.php?year=$1&monthnum=$2 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /blog/index.php?year=$1&monthnum=$2&day=$3 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&paged=$5 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&tb=1 [QSA,L] But now it still doesn't work. I also updated my wp-content directory and index.php as they suggested here: http://codex.wordpress.org/Make_a_Directory_Writable I have also noticed that none of the directories that should be there after "blog", e.g "http://www.cpadventures.com/blog/2005/09/" do not exist on my server (using ftp I do not see them). Thanks Edited September 3, 2005 by kfordham281 Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted September 3, 2005 Share Posted September 3, 2005 Wordpress uses a database to store your posts and displays them dynamically not static, so there will be no sub folders. Since you are not using a subdmain to access your blog these mod rewrite commands should be in your .htaccess file in the public_html folder and not the public_html/blog folder. So if you created a .htaccess file in your "blog" folder I would remove it and copy these lines into the .htaccess file of the /public_html folder. Then again, I am new to the mod_rewrite commands and I could be wrong. Someone please correct me if I am wrong. Quote Link to comment Share on other sites More sharing options...
kfordham281 Posted September 3, 2005 Author Share Posted September 3, 2005 .htaccess file is in the /public_html folder. I'm beginning to scan the wordpress support as well but so far no luck there either. Quote Link to comment Share on other sites More sharing options...
kfordham281 Posted September 5, 2005 Author Share Posted September 5, 2005 I was having problems adding Spam Karma 2 so I deleted the blog and will start the install over. Thanks - Kevin Quote Link to comment Share on other sites More sharing options...
TCH-Tim Posted November 30, 2005 Share Posted November 30, 2005 Since you are not using a subdmain to access your blog these mod rewrite commands should be in your .htaccess file in the public_html folder and not the public_html/blog folder. So if you created a .htaccess file in your "blog" folder I would remove it and copy these lines into the .htaccess file of the /public_html folder. Then again, I am new to the mod_rewrite commands and I could be wrong. Someone please correct me if I am wrong. I put my permalink rewrite rules in the .htaccess in my /public_html/wp directory, not in /public_html. Don't really know what's right or wrong, just what works for me. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted November 30, 2005 Share Posted November 30, 2005 Tim is correct. The .htaccess file needs to be in what ever folder your blog is running in. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.