Help with Permalinks please
-
I have my blog incorporated into my forum, in the folder /blog/ (the forum is at the root of the domain).
The blog is using index.php in the /blog/ folder.
I want to enable month/day/name permalinks for my posts, but when I choose this option in the admin panel, it says I need the following in my .htaccess –
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/index.php/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php/index.php [L]
</IfModule>If I put that into my .htacess, trying to acces my blog results in a 404 error.
here is my blog –
http://www.ohlookaforum.com/blog/
HELP!!!!!! lol
-
Try putting:
Options +FollowSymlinksat the top of the .htaccess file.
My .htaccess is also used for my forum url rewriting and no duplicates etc. will adding that line affect any of those?
Hi,
As you are modifying the permalinks..add this code in htaccess file..
# BEGIN WordPress
<IfModule mod_rewrite.c>
ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress[spam link moderated]
Maybe I first should have asked which htaccess you are editing. You need to place those and the:
Options +FollowSymlinks
in the .htaccess in your blog directory.
You probably would need that line in your forum as wellor the rewrite won’t work for it.There is currently no .htaccess in the blog folder.
Here is the content of the .htaccess in the root of the domain (where the forum files are) –
# Lines That should already be in your .htacess <Files "config.php"> Order Allow,Deny Deny from All </Files> <Files "common.php"> Order Allow,Deny Deny from All </Files> # You may need to un-comment the following lines # Options +FollowSymlinks # To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist # Options -MultiViews # REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE RewriteEngine On # REWRITE BASE RewriteBase / # HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION ##################################################### # PHPBB SEO REWRITE RULES - MIXED ##################################################### # AUTHOR : dcz www.phpbb-seo.com # STARTED : 01/2006 ################################# # FORUMS PAGES ############### # FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX # RewriteRule ^forum\.html$ /index.php [QSA,L,NC] # FORUM RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /viewforum.php?f=$1&start=$3 [QSA,L,NC] # TOPIC WITH VIRTUAL FOLDER RewriteRule ^[a-z0-9_-]*-f([0-9]+)/topic([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC] # GLOBAL ANNOUNCES WITH VIRTUAL FOLDER RewriteRule ^announces/topic([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC] # TOPIC WITHOUT FORUM ID & DELIM RewriteRule ^([a-z0-9_-]*)/?topic([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC] # PROFILES THROUGH USERNAME RewriteRule ^member/([^/]+)/?$ /memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC] # USER MESSAGES THROUGH USERNAME RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 [QSA,L,NC] # GROUPS ADVANCED RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC] # POST RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC] # ACTIVE TOPICS RewriteRule ^active-topics(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC] # UNANSWERED TOPICS RewriteRule ^unanswered(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC] # NEW POSTS RewriteRule ^newposts(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC] # THE TEAM RewriteRule ^the-team\.html$ /memberlist.php?mode=leaders [QSA,L,NC] # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES # FORUM WITHOUT ID & DELIM # THESE THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC] # END PHPBB PAGES #####################################################Permalinks requires an .htaccess in its folder. CReate an empty one in the blog directory and try resetting permalinks in WOrdpress. It should put in the required entries. ONLY if WP does not edit the htaccess itself add this to the .htaccess IN THE BLOG directory:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPressI’ve tried every option given (in the blog folder’s .htacces) and every one of them results in a 404 (you’re looking for something that’s not here”..???
Try putting:
Options +FollowSymlinksat the top of the .htaccess file.
I did try that, it didn’t work, it resulted in a 404, the same as without it.
Check the URL’s in Settings. Make sure they are correct for WP.
yes, they appear to be.. would i get this same problem if i just install one of the many seo plugins available?
I realize this is an old one but I’m having a similar problem. I switched the site from a linux server to a windows server and now permalinks will not work. I have tried with index.php and without. When I click any link I get a 404. Here’s my file with some suggestions I got from this thread
# BEGIN WordPress <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteBase /news RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /news/index.php [L] </IfModule> # END WordPressAny advice is much appreciated. When I have permalinks turned off, I have no problem, but who wants those ugly links?
Thanks in advance!
http://wordpress.org/support/topic/347815?replies=5
looks like someone else has a thread running that may help you
Yep, that looks like the same problem. Thanks!
The topic ‘Help with Permalinks please’ is closed to new replies.