vBulletin 4, the most powerful community software + vBSEO 3.5, the ultimate SEO solution = Your ultimate platform for 2010 and beyond. Click below to learn more.

Page 1 of 3
1 2 3 LastLast
Results 1 to 15 of 32

rewrite rules, httpd.conf

This is a discussion on rewrite rules, httpd.conf within the General Discussion forums, part of the vBSEO SEO Plugin category; Hi, I just moved on to a dedicated server and noticed this optimization tip below. Move rewrite rules from .htaccess ...

  1. #1
    Member
    Real Name
    Tony
    Join Date
    Dec 2005
    Location
    RI
    Posts
    59

    rewrite rules, httpd.conf

    Hi,

    I just moved on to a dedicated server and noticed this optimization tip below.

    Move rewrite rules from .htaccess to httpd.conf

    For users with dedicated servers, the vBSEO rewrite rules applied in the .htaccess files can be moved directly into the httpd.conf file for more efficient performance.



    I'm not seeing httpd.conf on the server now. What excatly do I put in httpd.conf, everything that is in .htaccess? Here is what I have in .htaccess now,
    PHP Code:
    RewriteEngine On
    RewriteCond 
    %{REQUEST_FILENAME} !-f
    RewriteCond 
    %{REQUEST_FILENAME} !-d
    RewriteRule 
    ^([^/]+)$ http:// Mysite.com [L,R=301] 
    Thanks

  2. #2
    vBSEO.com SysAdmin Danny Bembibre's Avatar
    Real Name
    Daniel Bembibre Gude @dbembibre
    Join Date
    Mar 2007
    Location
    Madrid (Spain)
    Posts
    646
    Blog Entries
    20
    Look for your virtual host file, and put into the directory tag.
    For example your site are at /var/www/vhosts/yoursite.com/httpdocs
    You can found the config file related to your site at /var/www/vhosts/yoursite.com/conf open it and find
    Code:
    <Directory /var/www/vhosts/yoursite.com/httpdocs>
    put the rewrite rules here !
    </directory>
    
    vBSEO Success Story: bmwfaq.com 95% indexed in yahoo, 85% indexed in google and straight up and 10% indexed in bing

  3. #3
    Member
    Real Name
    Tony
    Join Date
    Dec 2005
    Location
    RI
    Posts
    59
    I'm not seeing the directory /var. I must not be in the full root or something. I guess I will have to contact my host to see whats up.

  4. #4
    vBSEO.com SysAdmin Danny Bembibre's Avatar
    Real Name
    Daniel Bembibre Gude @dbembibre
    Join Date
    Mar 2007
    Location
    Madrid (Spain)
    Posts
    646
    Blog Entries
    20
    Try with /home/vhosts/yoursite.com/httpdocs

    Or contact with the hoster to get info about this
    vBSEO Success Story: bmwfaq.com 95% indexed in yahoo, 85% indexed in google and straight up and 10% indexed in bing

  5. #5
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,983
    mine is here:

    /usr/local/apache/conf/httpd.conf

    try that

  6. #6
    Member
    Real Name
    Tony
    Join Date
    Dec 2005
    Location
    RI
    Posts
    59
    Sorry for the delay guys! I just emailed my host this morning. It looks like I only have access to the one account via ftp.

    Do you guys run different accounts(websites) on your server? I have troubles with this. It seems vbseo rewrites the url for them as well.

  7. #7
    Member
    Real Name
    Tony
    Join Date
    Dec 2005
    Location
    RI
    Posts
    59
    I can only log into the full root through shell, not ftp.

  8. #8
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    Do you guys run different accounts(websites) on your server? I have troubles with this. It seems vbseo rewrites the url for them as well.
    You can try to put this .htaccess in folders for other websites:
    Code:
    RewriteEngine off
    
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  9. #9
    Member
    Real Name
    webmastersitesi.com
    Join Date
    Oct 2007
    Posts
    33
    Blog Entries
    1
    i see at ssh should i put the documents # 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 /
    #RewriteCond %{HTTP_HOST} !^blog\.webmastersitesi\.com
    .................................................. .................... the whole htaccess...

    <Directory "/">
    Options All
    AllowOverride All
    </Directory>
    <Directory "/usr/local/apache/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

    is the place correct? or i should go with /home/vhosts/yoursite.com/httpdocs

  10. #10
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    or i should go with /home/vhosts/yoursite.com/httpdocs
    Yes, it should be the directory specific to your website domain.
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  11. #11
    Junior Member
    Real Name
    Ahmad
    Join Date
    Sep 2007
    Location
    Kuwait
    Posts
    15
    just i want to ask if this correct:
    in httpd.cnf

    :
    <IfModule mod_bandwidth.c>
    <Directory "/home/q8manar/public_html">
    BandWidth all 2000
    # 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 /
    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
    RewriteRule ^(.*\.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]
    RewriteEngine On
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    </Directory>
    </IfModule>


    and I saved the file and restart the appachi
    is this OK?

  12. #12
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    Hello,

    since your forum resides in a subfolder, it should be:
    Code:
    <Directory "/home/q8manar/public_html/vb">
    ...
    </Directory>
    
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  13. #13
    Member f4vn's Avatar
    Real Name
    Mr AJ
    Join Date
    Nov 2007
    Posts
    71
    hi,

    I added in /usr/local/apache/conf/httpd.conf

    <Directory "/home/free4vn/public_html/vbb">
    # 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 /

    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron)
    RewriteRule ^((archive/)?(.*\.php(/.*)?)?)$ vbseo.php [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    </Directory>



    And I saved the file and restarted the appache But it does not work.


    404 Not Found

    The requested URL xxxxxxx.html does not exist.

    Anyone can help me fix it ?

  14. #14
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    Do you have your other domain settings defined in /usr/local/apache/conf/httpd.conf ? (may be you put rewrite rules in a wrong file)
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  15. #15
    Member f4vn's Avatar
    Real Name
    Mr AJ
    Join Date
    Nov 2007
    Posts
    71
    yes I have 2 other domain in /usr/local/apache/conf/httpd.conf

Similar Threads

  1. Syntax for Custom Rewrite Rules
    By Joe Ward in forum Custom Rewrite Rules
    Replies: 24
    Last Post: Yesterday, 04:22 PM
  2. move rewrite rules from .htaccess to httpd.conf
    By webgroup in forum Troubleshooting
    Replies: 11
    Last Post: 10-08-2008, 05:25 PM
  3. vBSEO 2.0 RC7 Released
    By Juan Muriente in forum vBSEO Announcements
    Replies: 17
    Last Post: 09-08-2005, 11:00 PM