Results 1 to 3 of 3

Thread: .htaccess question for search friendly URL's

  1. #1

    Default .htaccess question for search friendly URL's

    Hi there

    So ... I want dynamics to be in the root of my web folder and have vB be in a forum sub directory.

    The question I have is that when I turn on Spider Friendly URL's and use the provided .htaccess ... I can't get to the forums anymore, because the .htaccess is trying to rewrite it.

    Here's the current .htaccess:

    Code:
    Options +FollowSymlinks
    RewriteRule ^([a-zA-Z_0-9\-]+)/robots\.txt$ robots.txt [QSA,L]
    RewriteRule ^members/page([0-9]+).html$ index.php?page=$1 [QSA,L]
    RewriteRule ^whatsnew/entries/([0-9]+)/page([0-9]+).html$ /browsecategory.php?do=newentries&cutoffdate=$1&page=$2 [QSA,L]
    RewriteRule ^whatsnew/entries/(([0-9]|-)+/?)$ /browsecategory.php?do=newentries&cutoffdate=$1 [QSA,L]
    RewriteRule ^whatsnew/entries/?$ /browsecategory.php?do=newentries [QSA,L]
    RewriteRule ^whatsnew/posts/([0-9]+)/page([0-9]+).html$ /browsecategory.php?do=newposts&cutoffdate=$1&page=$2 [QSA,L]
    RewriteRule ^whatsnew/posts/([0-9]+)$ /browsecategory.php?do=newposts&cutoffdate=$1 [QSA,L]
    RewriteRule ^whatsnew/posts/?$ /browsecategory.php?do=newposts [QSA,L]
    RewriteRule ^whatspopular/([a-zA-Z_0-9\-]+)/$ /browsecategory.php?do=popentries&orderby=$1 [QSA,L]
    RewriteRule ^members/([a-zA-Z_0-9\-]+)/page([0-9]+).html$ /browsecategory.php?do=member&userrewrite=$1&page=$2 [QSA,L]
    RewriteRule ^members/(([a-zA-Z_0-9]|-)+/?)$ /browsecategory.php?do=member&userrewrite=$1 [QSA,L]
    RewriteRule ^([a-zA-Z_0-9\-]+)/members/([a-zA-Z_0-9\-]+)/page([0-9]+).html$ /browsecategory.php?userrewrite=$2&catrewrite=$1&page=$3 [QSA,L]
    RewriteRule ^([a-zA-Z_0-9\-]+)/members/(([a-zA-Z_0-9]|-)+/?)$ /browsecategory.php?userrewrite=$2&catrewrite=$1 [QSA,L]
    RewriteRule ^([a-zA-Z_0-9\-]+)/(([a-zA-Z_0-9]|-)+)/$ showentry.php?entryrewrite=$2&catrewrite=$1 [QSA,L]
    RewriteRule ^([a-zA-Z_0-9\-]+)/([a-zA-Z_0-9\-]+)/page([0-9]+).html$ showentry.php?entryrewrite=$2&catrewrite=$1&page=$3 [QSA,L]
    RewriteRule ^([a-zA-Z_0-9\-]+)/([a-zA-Z_0-9\-]+)/epage([0-9]+).html$ showentry.php?entryrewrite=$2&catrewrite=$1&epage=$3 [QSA,L]
    RewriteRule ^([a-zA-Z_0-9\-]+)/page([0-9]+).html$ /browsecategory.php?catrewrite=$1&page=$2 [QSA,L]
    RewriteRule ^([a-zA-Z_0-9\-]+)/?$ /browsecategory.php?catrewrite=$1 [QSA,L]
    I tried adding exceptions by adding the following rule at the top:

    Code:
    RewriteCond %{REQUEST_URI} !/forum [NC]
    and

    Code:
    RewriteCond %{REQUEST_URI} !^/forum [NC]
    With and without a trailing slash

    and I tried:

    Code:
    RewriteRule ^/forum - [L]
    Since I don't know rewrite rules good enough ... I'm stabbing in the dark here.

    Can anyone help me out?

    Thank you.

  2. #2

    Default Re: .htaccess question for search friendly URL's

    I ended up just moving my dynamics to a subcategory.

  3. #3

    Default Re: .htaccess question for search friendly URL's

    I figured out this issue tonight, so I thought I would post here in case someone has the same issue.

    If you are trying to put the dynamics in the root directory and use the SEO .htaccess file, then you will find that your forum directory also get's caught up in the .htaccess rewriterules.

    To combat this add this line:

    rewriterule ^forum/ - [L]

    Directly under the rewrite engine on line. Like this:

    Options +FollowSymlinks
    RewriteEngine On
    rewriterule ^forum/ - [L]

    Where forum stands for the subdirectory where your forum is located.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Spider Friendly / SEO URL's Not Working?
    By Kaelon in forum Troubleshooting & Problems
    Replies: 7
    Last Post: 09-01-2007, 12:09 PM
  2. Replies: 3
    Last Post: 08-13-2007, 01:44 PM
  3. Search Engine Friendly
    By GuyFromChicago in forum Pre-Sale Questions
    Replies: 16
    Last Post: 11-25-2006, 05:02 PM
  4. More descriptive (SE friendly) url's without '?'
    By surfdude in forum "How Do I..." Questions
    Replies: 2
    Last Post: 08-18-2005, 01:44 PM
  5. search engine friendly?
    By bangthebook in forum Modifications
    Replies: 4
    Last Post: 03-01-2005, 12:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •