Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 16 to 30 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; Please try this to check if rewrite rules are working: http://www.vbseo.com/f77/how-check-i...my-site-21502/...

  1. #16
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Please try this to check if rewrite rules are working: [How to] Check if mod_rewrite is working for my site
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  2. #17
    Member
    Real Name
    Yogesh Sarkar
    Join Date
    Nov 2007
    Location
    New Delhi, India
    Posts
    51
    Liked
    0 times
    I have multiple domains in the httpd.conf (WHM/CPanel manged), where should I put the mod rewrite rules?

    Also should i create another file and include it or should I insert it directly if yes, at which place?

  3. #18
    Senior Member
    Real Name
    Dhillon
    Join Date
    Apr 2006
    Posts
    341
    Liked
    1 times
    Quote Originally Posted by Yogesh Sarkar View Post
    I have multiple domains in the httpd.conf (WHM/CPanel manged), where should I put the mod rewrite rules?

    Also should i create another file and include it or should I insert it directly if yes, at which place?
    You should put the content of .htaccess file like this:
    <Directory /path/to/your/forum>
    [insert rewrite rules here]
    </Directory>

    and restart Apache. You can remove .htaccess after that.

  4. #19
    Member
    Real Name
    Yogesh Sarkar
    Join Date
    Nov 2007
    Location
    New Delhi, India
    Posts
    51
    Liked
    0 times
    Thanks, just did that, will check if it makes a difference or not.

  5. #20
    Member
    Real Name
    Yogesh Sarkar
    Join Date
    Nov 2007
    Location
    New Delhi, India
    Posts
    51
    Liked
    0 times
    It is working slightly better though not as fast as the stock setup, need to do some tinkering.

  6. #21
    Member
    Real Name
    Ralf
    Join Date
    Feb 2009
    Posts
    62
    Liked
    0 times
    Quote Originally Posted by Notorious View Post
    You should put the content of .htaccess file like this:
    <Directory /path/to/your/forum>
    [insert rewrite rules here]
    </Directory>

    and restart Apache. You can remove .htaccess after that.

    I did exactly so:

    Code:
    ServerAlias     www.mb-forum.info
    ServerAlias     ralfs-mercedes-benz-forum.de
    ServerAlias     www.ralfs-mercedes-benz-forum.de
    <Directory "/var/www/dcx_redirect">
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_gets
    
    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]
    
    
    # allow from all
    # Options +Indexes
    
    
    </Directory>
    </VirtualHost>
    But after removing .htaccess the URLs are not reachable any more.

    Is there anything eles to do?

  7. #22
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hello Ralf,

    is "/var/www/dcx_redirect" your forums folder name? (not domain root but folder where vB is installed)
    Did you restart Apache?
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  8. #23
    Member
    Real Name
    Ralf
    Join Date
    Feb 2009
    Posts
    62
    Liked
    0 times
    Right, was wrong conf, but it doesn´t work with the right one:

    <VirtualHost *>

    DocumentRoot /var/www/dcx
    # DocumentRoot /srv/www/htdocs/baustelle

    ServerName Home - Ralfs Mercedes-Benz Forum
    # ErrorLog /var/www/dcx/logs/errors.log
    # CustomLog /var/www/dcx/logs/access.log combined

    <Directory "/var/www/dcx">
    # <Directory "/var/www/baustelle">


    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_gets

    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]


    allow from all
    Options +Indexes
    </Directory>
    </VirtualHost>
    Of course I´ve restarted apache with wet hands ;-)

  9. #24
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Is "/var/www/dcx" your forums folder? I think your vB is located in /forum/, so it's probably /var/www/dcx/forum.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  10. #25
    Member
    Real Name
    Ralf
    Join Date
    Feb 2009
    Posts
    62
    Liked
    0 times
    ??

    The URL ist http: //www. db-forum.de

    The board ist located http: //www. db-forum.de/forum

    Therefore the apache-config must show to /var/www/dcx, not to /var/www/dcx/forum

  11. #26
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    You can leave your main apache config, but you should create a <Directory> section that points to a *forum* folder.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  12. #27
    Member
    Real Name
    Ralf
    Join Date
    Feb 2009
    Posts
    62
    Liked
    0 times
    Additional??

    <VirtualHost *>

    DocumentRoot /var/www/dcx

    ServerName Home - Ralfs Mercedes-Benz Forum

    <Directory "/var/www/dcx">

    </Directory>

    <Directory "/var/www/dcx/forum">
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_gets

    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]


    allow from all
    Options +Indexes
    </Directory>

    Does this work??

    </VirtualHost>

  13. #28
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Yes.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  14. #29
    Member
    Real Name
    Ralf
    Join Date
    Feb 2009
    Posts
    62
    Liked
    0 times
    Or not:

    Code:
    <Directory "/var/www/dcx">
    # <Directory "/var/www/baustelle">
    
    
    allow from all
    Options +Indexes
    </Directory>
    
    <Directory "/var/www/dcx/forum">
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_
    
    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|imag
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    
    
    allow from all
    Options +Indexes
    </Directory>
    
    </VirtualHost>
    
    
    
    
    File /etc/apache2/sites-enabled/www.db-forum.de.conf saved
    web:~# /etc/init.d/apache2 restart
    Forcing reload of web server (apache2)... waiting apache2: Syntax error on line 625 of /etc/apache2/apache2.conf: Syntax error on line 47 of /etc/apache2/sites-enabled/www.db-forum.de.conf: </VirtualHost> without matching <VirtualHost> section
     failed!

  15. #30
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    The <Directory> section should be inside of <VirtualHost> .. </VirtualHost> section.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


Page 2 of 3 FirstFirst 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
  •