Results 1 to 3 of 3

Is it possible to have the rewrite rules in the httpd.conf instead of .htaccess

This is a discussion on Is it possible to have the rewrite rules in the httpd.conf instead of .htaccess within the General Discussion forums, part of the vBSEO SEO Plugin category; As a point I try to not enable the .htaccess feature as it adds overhead, no matter how slight, to ...

  1. #1
    Junior Member
    Real Name
    Lawrence abrams
    Join Date
    Feb 2006
    Posts
    5
    Liked
    0 times

    Is it possible to have the rewrite rules in the httpd.conf instead of .htaccess

    As a point I try to not enable the .htaccess feature as it adds overhead, no matter how slight, to the server as it has to check every directory for a .htaccess file. I was wondering if it would be possible to put the rewrite rules in the httpd.conf file instead and if anyone has any success with that?

  2. #2
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    Yes you can, and that is recommeded for high-traffic sites from what I understand. Juan or Oleg can provide the httpd.conf lines.

  3. #3
    Senior Member
    Real Name
    Holger
    Join Date
    Oct 2005
    Location
    Frankfurt / Germany
    Posts
    611
    Liked
    1 times
    you can it include in your config in <Directory> .....</Directory>

    exemple

    Code:
    <VirtualHost server-ip>
    DocumentRoot /to/your/forum
    ServerName your domainname
    <Directory "/to/your/forum">
    
    
    RewriteEngine On
    #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]
    
    </Directory>
    regards

Similar Threads

  1. Syntax for Custom Rewrite Rules
    By Joe Ward in forum Custom Rewrite Rules
    Replies: 33
    Last Post: 02-10-2011, 09:49 PM
  2. Rewrite rules in httpd.conf or .htaccess?
    By porschinho in forum General Discussion
    Replies: 2
    Last Post: 12-28-2005, 06:27 PM
  3. vBSEO 2.0 RC7 Released
    By Juan Muriente in forum vBSEO Announcements
    Replies: 17
    Last Post: 09-09-2005, 12:00 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
  •