Results 1 to 6 of 6

mod_rewrite loaded, but not working

This is a discussion on mod_rewrite loaded, but not working within the Troubleshooting forums, part of the vBSEO SEO Plugin category; mod_rewite is listed in the "loaded modules" section of phpinfo(), yet the rules don't seem to be working. I've tried ...

  1. #1
    Junior Member
    Real Name
    Conrad Walton
    Join Date
    Feb 2006
    Posts
    4
    Liked
    0 times

    mod_rewrite loaded, but not working

    mod_rewite is listed in the "loaded modules" section of phpinfo(), yet the rules don't seem to be working. I've tried a couple test rules in the .htaccess file and they do not work.

    Where do I look to get mod-rewrite to work?

    .htaccess is in ASCII. I've even tried to put in a required password and it doesn't require when I hit the page with that either. It seems like it's not reading the .htaccess file at all.

    Yes, the httpd.config files has "AccessFileName .htaccess".

    This is a Mac OS X Server. PHP 5.0.3, Apache 1.3.33.

    There's one other weird thing that I've noticed. When I hit a page with phpinfo() in itin a browser, I get the page that says it's PHP 5.0.3 and the normal stuff I expect. When I use a command line to type "php -i", it tells me that It's PHP 4.3.11, the Zend Optimization engine is not included, etc., like it's a different Apache running or something. I'm not sure if this relates or not.

    Here is info from the phpinfo() page and the .htaccess file:

    Loaded Modules
    mod_php5, mod_WebObjects, mod_jk, mod_dav, mod_ssl, mod_rendezvous_apple, mod_digest_apple, mod_hfs_apple, mod_perl, mod_sherlock_apple, mod_macbinary_apple, mod_setenvif, mod_so, mod_unique_id, mod_usertrack, mod_headers, mod_expires, mod_cern_meta, mod_proxy, mod_digest, mod_auth_dbm, mod_auth_anon, mod_auth_apple, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_speling, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_vhost_alias, http_core

    .htaccess
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On

    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums)
    RewriteBase /
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.*)$ $1 [L]

    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_FILENAME} !chat
    RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]

    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]

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

    RewriteRule rewritetest\.html http://www.google.com

    RewriteRule ^(hello/)$ http://www.google.com

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

    to allow mod_rewrite configuration in .htaccess files, it is also required to add "Options +FollowSymLinks" for your document root folder.
    Please check that in your httpd.conf file.

  3. #3
    Junior Member
    Real Name
    Conrad Walton
    Join Date
    Feb 2006
    Posts
    4
    Liked
    0 times
    That was a fast reply! Thanks. Here's what's in the httpd.conf file.

    ## Each directory to which Apache has access, can be configured with respect
    ## to which services and features are allowed and/or disabled in that
    ## directory (and its subdirectories).
    ##
    ## First, we configure the "default" to be a very restrictive set of
    ## permissions.
    ##
    <Directory "/">
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    ##

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    PM sent

  5. #5
    Junior Member
    Real Name
    Conrad Walton
    Join Date
    Feb 2006
    Posts
    4
    Liked
    0 times
    That got it to work. My test pages still didn't work, but the forum itself and vbseo works fine now.

    Thanks for the quick response on this. It's worth the money I spent!

    -c

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    Great, you are welcome!

Similar Threads

  1. Replies: 12
    Last Post: 03-15-2006, 09:27 AM
  2. my forums quit working, HELP!
    By Mike in forum Troubleshooting
    Replies: 6
    Last Post: 11-18-2005, 06:07 PM
  3. Working with vBadvanced CMPS
    By mic_jan in forum Pre-Sales Questions
    Replies: 3
    Last Post: 10-29-2005, 05:19 AM
  4. [BugReport] DHTML Popup-Menu stopped working
    By Doc Great in forum Bug Reporting
    Replies: 6
    Last Post: 10-04-2005, 07:58 AM
  5. Some links are not working :(
    By MrNase in forum Bug Reporting
    Replies: 5
    Last Post: 09-24-2005, 03:07 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
  •