Mobile app version of vmapp.org
Login or Join
Gretchen104

: Redirect before rewrite Had an issue where I need to redirect old URLs, but not disable the mod_rewrite for page structure. redirect 301 /home.html http://www.example.com/ It needs to live on

@Gretchen104

Posted in: #301Redirect #Htaccess #ModRewrite

Had an issue where I need to redirect old URLs, but not disable the mod_rewrite for page structure.

redirect 301 /home.html www.example.com/

It needs to live on the Symphony 2.0 .htaccess file

### Symphony 2.0.x ###
Options +FollowSymlinks -Indexes

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteBase /

### DO NOT APPLY RULES WHEN REQUESTING "favicon.ico"
RewriteCond %{REQUEST_FILENAME} favicon.ico [NC]
RewriteRule .* - [S=14]

### IMAGE RULES
RewriteRule ^image/(.+.(jpg|gif|jpeg|png|bmp))$ extensions/jit_image_manipulation/lib/image.php?param= [L,NC]

### CHECK FOR TRAILING SLASH - Will ignore files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ / [L,R=301]

### ADMIN REWRITE
RewriteRule ^symphony/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^symphony(/(.*/?))?$ index.php?symphony-page=&mode=administration&%{QUERY_STRING} [NC,L]

### FRONTEND REWRITE - Will ignore files and folders
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/?)$ index.php?symphony-page=&%{QUERY_STRING} [L]

</IfModule>
######

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen104

1 Comments

Sorted by latest first Latest Oldest Best

 

@Goswami781

Try this code in your .htaccess file:


RewriteRule ^home(.*) example.com/ [R=301,L]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme