Could someone help me put a 301 redirect in my .htaccess

Discussion in 'Site & Server Administration' started by anonymous479, Jul 25, 2011.

  1. #1
    RewriteEngine off
    <IfModule mod_suphp.c>
    	suPHP_ConfigPath /home/xxx/public_html/mydomain.com/php.ini
    	<Files php.ini>
    		order allow,deny
    		deny from all
    	</Files>
    </IfModule>
    <IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteBase / 
    RewriteRule ^index\.php$ - [L] 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule . /index.php [L] 
    </IfModule> 
    
    RedirectMatch 301 /Health-Beauty/Bath-Time/.* http://www.mydomain.com/for-couples/bath-time/
    
    
    Code (markup):
    I just need mydomain.com/health-beauty/bath-time/ to redirect to /for-couples/bath-time

    Could someone help me out..htacces file above.
     
    anonymous479, Jul 25, 2011 IP
  2. selvamurali

    selvamurali Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
  3. anonymous479

    anonymous479 Active Member

    Messages:
    337
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    using your link here, is what I got --- still not working

    RewriteEngine off
    <IfModule mod_suphp.c>
    	suPHP_ConfigPath /home/sizz/public_html/domain.com/php.ini
    	<Files php.ini>
    		order allow,deny
    		deny from all
    	</Files>
    </IfModule>
    <IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteBase / 
    RewriteRule ^index\.php$ - [L] 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule . /index.php [L] 
    
    
    RewriteRule ^health-beauty/bath-time.*$  http://mydomain.com/for-couples/bath-time [R=301,L]
    
    
    
    </IfModule> 
    
    Code (markup):
     
    anonymous479, Jul 26, 2011 IP