logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Redirect over redirect apache host
Author
elrodrix



Joined: 11 Sep 2017
Posts: 1
Location: argentina

PostPosted: Mon 11 Sep '17 16:14    Post subject: Redirect over redirect apache host Reply with quote

Good morning. I am creating a friendly redirect rules, for urls that are a bit difficult. I have the following url legacy:

www.misitio.com/SeccionRevista/revista.html?id=ARS.

And I want to transform it to www.misitio.com/SeccionRevista/nueva-edicion-revista-m0007.html.

For this, I made a rule of this type (in the .conf of sites availables of apache2):

Regla friendly

RewriteCond% {REQUEST_URI} ^ / Revision Section /.*- m0007.html [NC]
RewriteRule ^ / SeccionRevista /.*- m0007.html /cms/SeccionRevista/revista.html?id=ARS [PT]

Now, the part that I can not solve, is to redirect the legacy url (indexed by Google), which returns a 301 to the new url friendly, but I still can not apply it to the same conf file (I do not know if this is correct). I mean, if Google has indexed my magazine.html? Id = ARS, the response is a 301 to new-edit-magazine-m0007.html.

My question is: is it possible to do this in the same host file? would not be in a loop ?, what other alternatives can I concur ?.

Greetings and thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 31 Oct '17 18:57    Post subject: Re: Redirect over redirect apache host Reply with quote

elrodrix wrote:


My question is: is it possible to do this in the same host file? would not be in a loop ?, what other alternatives can I concur ?.


host file? What do you mean? If you are talking about the hosts file from you computer then: no
Back to top


Reply to topic   Topic: Redirect over redirect apache host View previous topic :: View next topic
Post new topic   Forum Index -> Apache