View Full Version : .htaccess redirect
jscieza
03-31-2010, 09:37 AM
Hello,
I want to make a redirect like this through .htaccess:
from: http://www.forosperu.net/forumdisplay.php?f=282
to: http://www.forosperu.net/forumdisplay.php?f=323
I have just tried placing something like this on my .htaccess with no luck :(
Redirect 301 /forumdisplay.php?f=282 http://www.forosperu.net/forumdisplay.php?f=323
It's possible to do it using .htaccess?
Thank you,
Jonathan
jscieza
04-01-2010, 02:00 PM
Any idea? :confused:
Try adding the "RewriteEngine on" just before the redirect.
I put one before each set of rules.
RewriteEngine on
Redirect 301 /forumdisplay.php?f=282 http://www.forosperu.net/forumdisplay.php?f=323
jscieza
04-02-2010, 01:50 AM
Thanks but "RewriteEngine on" is present at the begin of .htaccess
Anyone here knows a possible workaround for this?
kNeeLy
04-02-2010, 12:57 PM
just a guess here...but maybe you need the http:// in the first link in the rewrite. It looks like you have it in the second part, but not the first.
I am VERY well aware that the RewriteEngine On command is at the beginning. :eek:
What I am suggesting you try, based on me having he same issue, is putting the RewriteEngine On command before every different set of rules.
The first set of rules here will redirect yoursite.com to www.yoursite.com.
The second set will redirect all yoursite.com/index requests to yoursite.com/
Both of these will help you avoid duplicate content penalties.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
RewriteEngine on
# index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
RewriteEngine on
Redirect 301 /folder http://www.yoursite.com/folder
Redirect 301 /folder http://www.yoursite.com/folder
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.