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.

Results 1 to 7 of 7

rewrite rules to httpd.conf: How?

This is a discussion on rewrite rules to httpd.conf: How? within the General Discussion forums, part of the vBSEO SEO Plugin category; Hi ! Sorry for this newbie question. If i want have the rewrites rules working from httpd.conf all what i ...

  1. #1
    Junior Member
    Real Name
    Walter
    Join Date
    Dec 2005
    Location
    Argentine
    Posts
    8

    rewrite rules to httpd.conf: How?

    Hi !

    Sorry for this newbie question. If i want have the rewrites rules working from httpd.conf all what i need is move the content from the htaccess there? Or i need include some extra-rules to the config file?
    Where i can find instructions to do that?

    Thanx !
    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!

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

    Re: rewrite rules to httpd.conf: How?

    Hello Acido,

    the rewrite rules inserted into httpd.conf are slightly different from the ones in .htaccess.

    They may be different depending on server configuration, but here is an example of directives to include into a corresponding <VirtualHost> section:
    RewriteEngine On

    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}index.php -f
    RewriteRule ^(/forum.*)/$ $1/index.php?%{QUERY_STRING} [L]

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

    RewriteCond %{REQUEST_FILENAME} /forum/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.*)$ $1 [L]

    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteRule ^/forum/(.*\.php)$ /forum/vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]

    RewriteRule ^/forum/(archive/.*)$ /forum/vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]

    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
    RewriteRule ^/forum/(.+)$ /forum/vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    Replace "/forum" with vB subfolder name ("/' when vB is in root)
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation

    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!

  3. #3
    Junior Member
    Real Name
    Walter
    Join Date
    Dec 2005
    Location
    Argentine
    Posts
    8

    Re: rewrite rules to httpd.conf: How?

    thanx Oleg, but is not working yet. All the url's end is 404 error.

    What if try with absoluthe paths? can you give me the sintaxis but usinf full path instead of /forums ?
    My htaccess works perfect. My trouble is on the httpd.conf and i'm not sure where start to check the trouble :(

    My instalation is in :www.mydomain.com/foros
    (vb is not in root)
    Last edited by Acido; 12-23-2005 at 06:31 PM.
    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!

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

    Re: rewrite rules to httpd.conf: How?

    Basically, it is not required to specify full paths, you just need to replace "/forum" with "/foros".

    Did you restarted Apache after httpd.conf modification? (this is a required step)
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation

    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!

  5. #5
    Junior Member
    Real Name
    Walter
    Join Date
    Dec 2005
    Location
    Argentine
    Posts
    8

    Re: rewrite rules to httpd.conf: How?

    Quote Originally Posted by Oleg Ignatiuk
    Basically, it is not required to specify full paths, you just need to replace "/forum" with "/foros".

    Did you restarted Apache after httpd.conf modification? (this is a required step)
    Still with error 404 on all Url's
    Yes, we restart apache on each httpd.conf modification. I send you a PM to chek my personal config, ok ?
    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!

  6. #6
    Junior Member
    Real Name
    Walter
    Join Date
    Dec 2005
    Location
    Argentine
    Posts
    8

    Re: rewrite rules to httpd.conf: How?

    Well here is my solution for httpd.conf :

    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    <Directory /full-path-to-vbroot>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule \.0([0-9]+)\.html$ /full-path-to-vbroot/forumdisplay.php?f=$1&%{QUERY_STRING} [L]
    RewriteRule \.([0-9]+)\.html$ /full-path-to-vbroot/showthread.php?t=$1&%{QUERY_STRING} [L]
    RewriteRule ^(sitemap.*\.(xml|txt)(\.gz)?)$ /full-path-to-vbroot/vbseo_sitemap/vbseo_getsitemap.p$
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteRule ^(.*\.php)$ /full-path-to-vbroot/vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    RewriteRule ^(archive/.*)$ /full-path-to-vbroot/vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ /full-path-to-vbroot/vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    </Directory>
    where /full-path-to-vbroot is replaced with the full server path to my vbulletin root folder.

    Al running fine now
    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!

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

    Re: rewrite rules to httpd.conf: How?

    Great!
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation

    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!

Similar Threads

  1. Syntax for Custom Rewrite Rules
    By Joe Ward in forum Custom Rewrite Rules
    Replies: 19
    Last Post: 01-17-2010, 06:23 PM
  2. vBSEO 2.0 RC7 Released
    By Juan Muriente in forum vBSEO Announcements
    Replies: 17
    Last Post: 09-08-2005, 11:00 PM