Results 1 to 4 of 4

Rewrite code help

This is a discussion on Rewrite code help within the Troubleshooting forums, part of the vBSEO SEO Plugin category; I have some pages that have been ranked and now I have move things around. I had a links.php file ...

  1. #1
    Junior Member
    Real Name
    stockhideout
    Join Date
    Feb 2006
    Location
    NJ
    Posts
    17
    Liked
    0 times

    Rewrite code help

    I have some pages that have been ranked and now I have move things around. I had a links.php file that I now want to point to a directory. Is that possible? I saw the below code for another solution but how would I use Rewrite code for file to directory?

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

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

    Do you mean that you had http://example.com/links.php?xxx pages and now ALL they become http://example.com/links/links.php?xxx ?
    If so, you can try the following for this:

    RewriteRule ^links\.php links/$1?%{QUERY_STRING} [L,R=301]
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #3
    Junior Member
    Real Name
    stockhideout
    Join Date
    Feb 2006
    Location
    NJ
    Posts
    17
    Liked
    0 times
    Quote Originally Posted by Oleg Ignatiuk
    Hello,

    Do you mean that you had
    If so, you can try the following for this:
    Sorry for not explaining it very well. Here is the scenario:
    http://example.com/links.php page and now I installed a link exchange application that is running here http://example.com/links/index.php

    Also, in my .htaccess file right now I have all the vBSEO code. Would this addition above be placed at the top or bottom of the vBSEO code?

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

    you should add the following right after "RewriteEngine on" line:
    RewriteRule ^links\.php links/index.php [L,R=301]
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


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