vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now!
vBSEO 2.0 Style Released vBSEO 3.3.0 GOLD Launched vBSEO's "LiveStats" for Google Analytics vB Sitemap Generator, Version 2.5 Success with vBSEO = 600ore Web Visitors + $1400 in a Day!

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 ...

Go Back   vBulletin SEO Forums > vBSEO SEO Plugin > General Discussion

Enhancing 80 million pages.


Reply

 

LinkBack Thread Tools
  #1  
Old 11-07-2007, 06:16 AM
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.

Quote:
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #2  
Old 11-07-2007, 08:34 AM
Danny Bembibre's Avatar
vBSEO.com SysAdmin
vBulletin HackerBig Board Administrator
 
Real Name: Daniel Bembibre Gude
Join Date: Mar 2007
Location: Madrid (Spain)
Posts: 632
Blog Entries: 20
Send a message via MSN to Danny Bembibre Send a message via Skype™ to Danny Bembibre
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>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #3  
Old 11-08-2007, 06:33 AM
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #4  
Old 11-08-2007, 07:26 AM
Danny Bembibre's Avatar
vBSEO.com SysAdmin
vBulletin HackerBig Board Administrator
 
Real Name: Daniel Bembibre Gude
Join Date: Mar 2007
Location: Madrid (Spain)
Posts: 632
Blog Entries: 20
Send a message via MSN to Danny Bembibre Send a message via Skype™ to Danny Bembibre
Try with /home/vhosts/yoursite.com/httpdocs

Or contact with the hoster to get info about this
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #5  
Old 11-12-2007, 02:55 PM
briansol's Avatar
Senior Member
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 7,090
mine is here:

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

try that
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #6  
Old 11-14-2007, 06:27 AM
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #7  
Old 11-14-2007, 05:41 PM
Member
 
Real Name: Tony
Join Date: Dec 2005
Location: RI
Posts: 59
I can only log into the full root through shell, not ftp.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #8  
Old 11-14-2007, 07:05 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Quote:
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 Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #9  
Old 03-02-2008, 09:17 PM
Junior Member
 
Real Name: webmastersitesi.com
Join Date: Oct 2007
Posts: 25
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
__________________
webmaster forum
webmaster forumu
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #10  
Old 03-03-2008, 02:30 AM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Quote:
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 Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #11  
Old 04-01-2008, 09:52 AM
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #12  
Old 04-01-2008, 12:13 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Hello,

since your forum resides in a subfolder, it should be:
Code:
<Directory "/home/q8manar/public_html/vb">
...
</Directory>
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #13  
Old 07-30-2008, 05:37 AM
f4vn's Avatar
Member
 
Real Name: Mr AJ
Join Date: Nov 2007
Posts: 68
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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #14  
Old 07-30-2008, 09:46 AM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
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 Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #15  
Old 07-30-2008, 11:17 AM
f4vn's Avatar
Member
 
Real Name: Mr AJ
Join Date: Nov 2007
Posts: 68
yes I have 2 other domain in /usr/local/apache/conf/httpd.conf
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Syntax for Custom Rewrite Rules Joe Ward Custom Rewrite Rules 10 04-15-2009 09:45 AM
move rewrite rules from .htaccess to httpd.conf webgroup Troubleshooting 11 10-08-2008 05:25 PM
vBSEO 2.0 RC7 Released Juan Muriente vBSEO Announcements 17 09-08-2005 11:00 PM


All times are GMT -4. The time now is 09:01 PM.


Powered by vBulletin Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.