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

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
    Senior Member
    Real Name
    Tony
    Join Date
    Dec 2005
    Location
    RI
    Posts
    100
    Liked
    0 times

    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
    Liked
    13 times
    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
    Senior Member
    Real Name
    Tony
    Join Date
    Dec 2005
    Location
    RI
    Posts
    100
    Liked
    0 times
    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
    Liked
    13 times
    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,981
    Liked
    8 times
    mine is here:

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

    try that

  6. #6
    Senior Member
    Real Name
    Tony
    Join Date
    Dec 2005
    Location
    RI
    Posts
    100
    Liked
    0 times
    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
    Senior Member
    Real Name
    Tony
    Join Date
    Dec 2005
    Location
    RI
    Posts
    100
    Liked
    0 times
    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
    25,689
    Liked
    157 times
    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.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  9. #9
    Senior Member webmastersitesi's Avatar
    Join Date
    Oct 2007
    Posts
    518
    Liked
    15 times
    Blog Entries
    3
    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
    25,689
    Liked
    157 times
    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.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  11. #11
    Junior Member
    Real Name
    Ahmad
    Join Date
    Sep 2007
    Location
    Kuwait
    Posts
    27
    Liked
    0 times
    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
    25,689
    Liked
    157 times
    Hello,

    since your forum resides in a subfolder, it should be:
    Code:
    <Directory "/home/q8manar/public_html/vb">
    ...
    </Directory>
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  13. #13
    Senior Member f4vn's Avatar
    Real Name
    Lam AJ
    Join Date
    Nov 2007
    Posts
    107
    Liked
    5 times
    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
    25,689
    Liked
    157 times
    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.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  15. #15
    Senior Member f4vn's Avatar
    Real Name
    Lam AJ
    Join Date
    Nov 2007
    Posts
    107
    Liked
    5 times
    yes I have 2 other domain in /usr/local/apache/conf/httpd.conf

Page 1 of 3 1 2 3 LastLast

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. move rewrite rules from .htaccess to httpd.conf
    By webgroup in forum Troubleshooting
    Replies: 11
    Last Post: 10-08-2008, 06:25 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
  •