Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Friendly URL's and Wordpress Mod Rewrite conflict

edited April 2007 in Vanilla 1.0 Help
(Please don't get afraid if my post is too long :P I included two htaccess files, that's why :P) Well, I'm having problems with WP permalink structure. In fact, the problem is that when I implement a MOD REWRITE mod to my Vanilla forums and I try to enter to a topic (per example www.mysite.com/forums/discussion/topic-name/#RandomID ) it redirects to my wordpress blog with the error message that the blog didn't found any post or comment that matched with the search keywords. I think that's because WP mod-rewrite system is configured to redirect "www.mysite.com/anything" to a search querry with "anything" as keyword. The rewrite mod I'm using has this htaccess (placed in my forum root folder, which is "./foro/": RewriteEngine On Options +FollowSymLinks -Multiviews #Discussions RewriteRule ^discussions$ index.php [QSA,L] RewriteRule ^discussions/$ index.php [QSA,L] RewriteRule ^discussions/([0-9]+)$ index.php?page=$1 [QSA,L] RewriteRule ^discussions/([0-9]+)/$ index.php?page=$1 [QSA,L] RewriteRule ^([0-9]+)$ index.php?CategoryID=$1 [QSA,L] RewriteRule ^([0-9]+)/$ index.php?CategoryID=$1 [QSA,L] RewriteRule ^([0-9]+)/([0-9]+)$ index.php?CategoryID=$1&page=$2 [QSA,L] RewriteRule ^([0-9]+)/([0-9]+)/$ index.php?CategoryID=$1&page=$2 [QSA,L] #Comments RewriteRule ^discussion/([0-9]+)/([0-9]+)/(.*)$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)/([0-9]+)/(.*)/$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)/(.*)$ comments.php?DiscussionID=$1 [QSA,L] RewriteRule ^discussion/([0-9]+)/(.*)/$ comments.php?DiscussionID=$1 [QSA,L] RewriteRule ^discussion/([0-9]+)/([0-9]+)$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)/([0-9]+)/$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)$ comments.php?DiscussionID=$1 [QSA,L] RewriteRule ^discussion/([0-9]+)/$ comments.php?DiscussionID=$1 [QSA,L] #Categories RewriteRule ^categories/$ categories.php [QSA,L] #Account RewriteRule ^account/$ account.php [QSA,L] RewriteRule ^account/([0-9]+)$ account.php?u=$1 [QSA,L] RewriteRule ^account/([0-9]+)/$ account.php?u=$1 [QSA,L] #Search RewriteRule ^search/$ search.php [QSA,L] RewriteRule ^search/([0-9]+)$ search.php?page=$1 [QSA,L] RewriteRule ^search/([0-9]+)/$ search.php?page=$1 [QSA,L] RewriteRule ^search/saved/([0-9]+)$ search.php?SearchID=$1 [QSA,L] RewriteRule ^search/saved/([0-9]+)/$ search.php?SearchID=$1 [QSA,L] RewriteRule ^search/saved/([0-9]+)/([0-9]+)$ search.php?SearchID=$1&page=$2 [QSA,L] RewriteRule ^search/saved/([0-9]+)/([0-9]+)/$ search.php?SearchID=$1&page=$2 [QSA,L] #Post RewriteRule ^post/$ post.php [QSA,L] RewriteRule ^post/([0-9]+)$ post.php?CommentID=$1 [QSA,L] RewriteRule ^post/([0-9]+)/$ post.php?CommentID=$1 [QSA,L] RewriteRule ^post/category/([0-9]+)$ post.php?CategoryID=$1 [QSA,L] RewriteRule ^post/category/([0-9]+)/$ post.php?CategoryID=$1 [QSA,L] #Settings RewriteRule ^settings/$ settings.php [QSA,L] #People RewriteRule ^people/$ people.php [QSA,L] #Extensions RewriteRule ^extension/$ extension.php [QSA,L] # Prevent some little bad effects of Friendly Urls on relative links in some # extensions RewriteRule ^(discussions|categories|search|post|settings|people|[0-9]+)/(extensions|themes|images|ajax)/(.*) $2/$3 [QSA,L] RewriteRule ^(discussions|categories|search|post|settings|people|[0-9]+)/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php) $2 [QSA,L] RewriteRule ^discussion/([0-9]+/){1,2}[^/]*/(extensions|themes|images|ajax)/(.*) $2/$3 [QSA,L] RewriteRule ^discussion/([0-9]+/){1,2}[^/]*/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php) $2 [QSA,L] RewriteRule ^(discussions|account|search|post|[0-9]+)/.+/(extensions|themes|images|ajax)/(.*) $2/$3 [QSA,L] RewriteRule ^(discussions|account|search|post|[0-9]+)/.+/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php) $2 [QSA,L] My WP htaccess (placed in my root folder: "./"): # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Options +MultiViews # END WordPress How can I fix this?, I hope this thread will help more WP users ;D Thanks in advantage!, José Antonio C.

Comments

  • Options
    MarkMark Vanilla Staff
    I'm not too great at mod_rewrite - but I know some people on here are... anyone have any advice?
  • Options
    Hello Mark, thanks for your reply ;)
    Now it's even bad, I deleted everything in my website FTP but the "foro" (it's in spanish xP) folder. I uploaded the .htaccess to ./foro/ and I'm still having problems, settings.php is also well configured.
    My forum is in a subdomain called "foro.xtasy.cl".
    When I click on a link in my forum index like http://foro.xtasy.cl/6/ ...which is supposed to load category with ID number 6... I get a 404 Not found page (message copied below).
    At this moment my forum index is the only page I can see with the rewrite configured in settings.php, and it's because I don't need a rewrite for loading http://foro.xtasy.cl/ as http://foro.xtasy.cl/index.php ):


    Error message when I try to load something with FriendlyURL's:

    Not Found
    The requested URL /6/ was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.33 Server at foro.xtasy.cl Port 80


    Thanks!
  • Options
    MarkMark Vanilla Staff
    *bump* for mod_rewrite gurus...
This discussion has been closed.