# Redirecting url from old to new

**URL:** <https://www.ruby-forum.com/t/redirecting-url-from-old-to-new/206837>\
**Category:** NGINX\
**Created:** [May 11, 2011, 2:24pm UTC](https://www.ruby-forum.com/t/redirecting-url-from-old-to-new/206837 "2011-05-11T14:24:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [May 11, 2011, 2:24pm UTC](https://www.ruby-forum.com/t/redirecting-url-from-old-to-new/206837/1 "2011-05-11T14:24:11Z")

</div>

Any body will help me to redirect my old wordpress post  
[http://tuffclassified.com/xyz/](http://tuffclassified.com/xyz/) to new custom post  
[http://tuffclassified.com/ads/xyz/](http://tuffclassified.com/ads/xyz/) . It was easy in apache as i have to  
add just

# END WordPress

RewriteRule ^/(.\*)$ [http://tuffclassified.com/ads/$1](http://tuffclassified.com/ads/$1) [R=301,L]

Posted at Nginx Forum:

> **[redirecting url from old to new](https://forum.nginx.org/read.php?2,197247,197247#msg-197247)**
>
> Any body will help me to redirect my old wordpress post http://tuffclassified.com/xyz/ to new custom post http://tuffclassified.com/ads/xyz/ . It was easy in apache as i have to add just # END WordPress RewriteRule ^/(.\*)$...

---

<div class="post-metadata">

**Author:** ![tuffclassified](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/d9b06d/32.png) [@tuffclassified](https://www.ruby-forum.com/u/tuffclassified)\
**Post date:** [May 11, 2011, 2:31pm UTC](https://www.ruby-forum.com/t/redirecting-url-from-old-to-new/206837/2 "2011-05-11T14:31:38Z")

</div>

On Wed, May 11, 2011 at 7:23 PM, tuffclassified [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Any body will help me to redirect my old wordpress post  
> [http://tuffclassified.com/xyz/](http://tuffclassified.com/xyz/) to new custom post  
> [http://tuffclassified.com/ads/xyz/](http://tuffclassified.com/ads/xyz/) . It was easy in apache as i have to  
> add just
> 
> # END WordPress
> 
> RewriteRule ^/(.\*)$ [http://tuffclassified.com/ads/$1](http://tuffclassified.com/ads/$1) [R=301,L]

location /xyz/ {  
rewrite ^ /ads/$uri permanent;  
…  
}

---

<div class="post-metadata">

**Author:** ![tuffclassified](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/d9b06d/32.png) [@tuffclassified](https://www.ruby-forum.com/u/tuffclassified)\
**Post date:** [May 12, 2011, 1:34pm UTC](https://www.ruby-forum.com/t/redirecting-url-from-old-to-new/206837/3 "2011-05-12T13:34:45Z")

</div>

2011/5/11 tuffclassified [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Any body will help me to redirect my old wordpress post  
> [http://tuffclassified.com/xyz/](http://tuffclassified.com/xyz/) to new custom post  
> [http://tuffclassified.com/ads/xyz/](http://tuffclassified.com/ads/xyz/) . It was easy in apache as i have to  
> add just
> 
> # END WordPress
> 
> RewriteRule ^/(.\*)$ [http://tuffclassified.com/ads/$1](http://tuffclassified.com/ads/$1) [R=301,L]

location / {  
rewrite ^ /ads$uri permanent;  
}

---

<div class="post-metadata">

**Author:** ![tuffclassified](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/d9b06d/32.png) [@tuffclassified](https://www.ruby-forum.com/u/tuffclassified)\
**Post date:** [May 12, 2011, 1:58pm UTC](https://www.ruby-forum.com/t/redirecting-url-from-old-to-new/206837/4 "2011-05-12T13:58:50Z")

</div>

thanks later one seems to work

Posted at Nginx Forum:

> **[Re: redirecting url from old to new](https://forum.nginx.org/read.php?2,197247,197578#msg-197578)**
>
> Any body will help me to redirect my old wordpress post http://tuffclassified.com/xyz/ to new custom post http://tuffclassified.com/ads/xyz/ . It was easy in apache as i have to add just # END WordPress RewriteRule ^/(.\*)$...
