Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
810 views
in Technique[技术] by (71.8m points)

apache - Redirect one url to another url using .htaccess

As i am trying to redirect one complete URL

http://www.domain-name.com/download/?page=download

To this URL

http://www.domain-name.com/download/show

For this to work I have added this code

rewriterule http://www.domain.com/download/?page=download(.*)$ http://www.domain.com/download/show$1 [r=301,nc]

But this is not working and instead it says the URL I am requesting says "Forbidden".

Can any one please give any solution for this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Redirect One URL to Another URL by Using htaccess file:

Redirect 301 /en/php/project.html http://www.example.org/newpage.html

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...