Welcome! Log In Create A New Profile

Advanced

How To : Redirect 301 via htaccess or conf

Posted by thesirwolf 
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 69
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready