Welcome! Log In Create A New Profile

Advanced

How To : Redirect 301 via htaccess or conf

Posted by thesirwolf 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
How To : Redirect 301 via htaccess or conf
April 24, 2010 03:28AM
Hi,

Yesterday i've change my servers as hardware and so i changed my web server to NginX.

I used to use subfolder with my portal. Now after changing servers i use subfolder nomore. So i've to redirect all requests to new url. As an example;

Previous url : www.example.com/v2/info.php?id=1

New URL : www.example.com/info.php?id=1

I've tried some but not succeeded.

Any idea could be usefull. Thanks.

Bahadir.
Re: How To : Redirect 301 via htaccess or conf
April 25, 2010 01:56PM
You can try:

[code]
location ^~ /v2/ {
rewrite ^ http://www.example.com$request_uri? permanent;
}
[/code]

--
Jim Ohlstein



Edited 1 time(s). Last edit at 04/25/2010 01:56PM by Jim Ohlstein.

Online Users

Guests: 68
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready