Results 1 to 4 of 4

Couple of annoying problems with root rewrites

This is a discussion on Couple of annoying problems with root rewrites within the Bug Reporting forums, part of the vBSEO SEO Plugin category; First what I am using as my root .htaccess file (Yes I know the last part is commented out, because ...

  1. #1
    Senior Member BamaStangGuy's Avatar
    Real Name
    Brent Wilson
    Join Date
    Aug 2005
    Location
    Huntsville, Alabama
    Posts
    2,484
    Liked
    1 times

    Couple of annoying problems with root rewrites

    First what I am using as my root .htaccess file (Yes I know the last part is commented out, because it was giving me errors):

    # $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
    #
    # This is used with Apache WebServers
    #
    # For this to work, you must include the parameter 'Options' to
    # the AllowOverride configuration
    #
    # Example:
    #
    # <Directory "/usr/local/apache/htdocs">
    # AllowOverride Options
    # </Directory>
    #
    # 'All' with also work. (This configuration is in the
    # apache/conf/httpd.conf file)

    # The following makes adjustments to the SSL protocol for Internet
    # Explorer browsers

    <IfModule mod_setenvif.c>
    <IfDefine SSL>
    SetEnvIf User-Agent ".*MSIE.*" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0
    </IfDefine>
    </IfModule>

    # Fix certain PHP values
    # (commented out by default to prevent errors occuring on certain
    # servers)

    #<IfModule mod_php4.c>
    # php_value session.use_trans_sid 0
    # php_value register_globals 1
    #</IfModule>

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^(.*)\.mustangevolution\.com$ [NC]
    RewriteRule ^(.*)$ http://www.mustangevolution.com/$1 [R=301,L]

    #RewriteCond %{REQUEST_FILENAME} !forum/
    #RewriteCond %{QUERY_STRING} !vbseourl=
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^(.*)$ forum/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]

    #RewriteCond %{REQUEST_FILENAME} !forum/
    #RewriteRule ^(.*.php)$ forum/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
    Secondly what I am using as my custom rewrite rules:

    'index\.php\?page=1994-1998history' => '1994-1998-ford-mustang-history-information/'
    'index\.php\?page=1994history' => '1994-ford-mustang-history-information/'
    'index\.php\?page=1995history' => '1995-ford-mustang-history-information/'
    'index\.php\?page=1996history' => '1996-ford-mustang-history-information/'
    'index\.php\?page=1997history' => '1997-ford-mustang-history-information/'
    'index\.php\?page=1998history' => '1998-ford-mustang-history-information/'
    'index\.php\?page=1999-2004history' => '1999-2004-ford-mustang-history-information/'
    'index\.php\?page=1999history' => '1999-ford-mustang-history-information/'
    'index\.php\?page=2000history' => '2000-ford-mustang-history-information/'
    'index\.php\?page=2001history' => '2001-ford-mustang-history-information/'
    'index\.php\?page=2002history' => '2002-ford-mustang-history-information/'
    'index\.php\?page=2003history' => '2003-ford-mustang-history-information/'
    'index\.php\?page=2004history' => '2004-ford-mustang-history-information/'
    'index\.php\?page=2005history' => '2005-ford-mustang-history-information/'
    'index\.php\?page=1994specifications' => '1994-ford-mustang-specifications/'
    'index\.php\?page=1995specifications' => '1995-ford-mustang-specifications/'
    'index\.php\?page=1996specifications' => '1996-ford-mustang-specifications/'
    'index\.php\?page=1997specifications' => '1997-ford-mustang-specifications/'
    'index\.php\?page=1998specifications' => '1998-ford-mustang-specifications/'
    'index\.php\?page=1999specifications' => '1999-ford-mustang-specifications/'
    'index\.php\?page=2000specifications' => '2000-ford-mustang-specifications/'
    'index\.php\?page=2000cobrar' => '2000-ford-mustang-cobra-r-specifications/'
    'index\.php\?page=2001specifications' => '2001-ford-mustang-specifications/'
    'index\.php\?page=2001bullit' => '2001-ford-mustang-bullitt-specifications/'
    'index\.php\?page=2002specifications' => '2002-ford-mustang-specifications/'
    'index\.php\?page=2003specifications' => '2003-ford-mustang-specifications/'
    'index\.php\?page=2003cobra' => '2003-ford-mustang-cobra-specifications/'
    'index\.php\?page=2003mach1' => '2003-ford-mustang-mach1-specifications/'
    'index\.php\?page=2004specifications' => '2004-ford-mustang-specifications/'
    'index\.php\?page=2004cobra' => '2004-ford-mustang-cobra-specifications/'
    'index\.php\?page=2004mach1' => '2004-ford-mustang-mach1-specifications/'
    'index\.php\?page=2005specifications' => '2005-ford-mustang-specifications/'
    'index\.php\?page=history' => 'ford-mustang-history-information/'
    'index\.php\?page=advertising' => 'advertising/'

    First problem:

    When I uncomment the part of the .htaccess file for the root rewrites I get redirected when I try to visit my phpadsnew folder http://www.mustangevolution.com/phpadsnew/

    The url I get redirected to is: http://www.mustangevolution.com/forum/?vbseorelpath=../ It loads the forumhome page with that url in the url area

    Second problem is:

    None of my urls are being rewrote before I click. They are only getting rewrote when I click on them. If you hover over the link it will show the old dynamic link, but when you click the link it will rewrite it perfect.

    Those are all I got now!

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    First problem:

    When I uncomment the part of the .htaccess file for the root rewrites I get redirected when I try to visit my phpadsnew folder http://www.mustangevolution.com/phpadsnew/

    The url I get redirected to is: http://www.mustangevolution.com/forum/?vbseorelpath=../ It loads the forumhome page with that url in the url area
    You may either exclude phpadsnew from processing:
    Code:
    RewriteCond %{REQUEST_FILENAME} !forum/
    RewriteCond %{REQUEST_FILENAME} !phpadsnew/
    RewriteRule ^(.*\.php)$ forum/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
    or allow processing of php files at the root level only:
    Code:
    RewriteRule ^([^/]*\.php)$ forum/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
    Second problem is:

    None of my urls are being rewrote before I click. They are only getting rewrote when I click on them. If you hover over the link it will show the old dynamic link, but when you click the link it will rewrite it perfect.
    Are they non-rewritten on all pages (both vB and non-vB)?

  3. #3
    Senior Member BamaStangGuy's Avatar
    Real Name
    Brent Wilson
    Join Date
    Aug 2005
    Location
    Huntsville, Alabama
    Posts
    2,484
    Liked
    1 times
    Quote Originally Posted by Oleg Ignatiuk
    You may either exclude phpadsnew from processing:
    Code:
    RewriteCond %{REQUEST_FILENAME} !forum/
    RewriteCond %{REQUEST_FILENAME} !phpadsnew/
    RewriteRule ^(.*.php)$ forum/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
    or allow processing of php files at the root level only:
    Code:
    RewriteRule ^([^/]*.php)$ forum/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]

    Are they non-rewritten on all pages (both vBulletin and non-vB)?
    They are rewritten on forum pages but not non forum pages

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    Ok, I see. The problem is found and fixed

    Thanks for reporting!

    /* NOTE: This issue has been resolved */

Similar Threads

  1. Custom rewrites in root directory
    By T2DMan in forum Custom Rewrite Rules
    Replies: 4
    Last Post: 03-31-2006, 04:29 AM
  2. VBSEO crashing new server
    By MentaL in forum Troubleshooting
    Replies: 20
    Last Post: 12-11-2005, 06:55 PM

Posting Permissions

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