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 url
Author
omelhor



Joined: 28 Sep 2013
Posts: 2

PostPosted: Sat 28 Sep '13 12:03    Post subject: redirect url Reply with quote

Hello,

I'm trying to redirect url like that : ( gentoo/linux )

http://www.site.tttt/page.php to http://www.site.tttt
http://www.site.tttt/page.php?p=500 to http://www.site.tttt


When i put on my .htaccess this line:
Code:
RedirectPermanent   /index1.php   http://www.site.tttt

Or this line:
Code:
RewriteRule ^index1.php(.*)$ http://site.tttt[R=301,L]


It works with this url http://www.site.ffff/page.php is redirected to http://www.site.tttt

But http://www.site.ffff/page.php?p=500 is redirect to http://www.site.ffff/?p=500
And i would like to redirect it to http://www.site.tttt

Do you know why ?
Can help me please ?

Thanks very much
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Sat 28 Sep '13 12:26    Post subject: Reply with quote

In your rule you have index1.php while you state in your try page.php.

You can try to redirect all:

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

Adjust www, site and com to your needs.
Back to top
omelhor



Joined: 28 Sep 2013
Posts: 2

PostPosted: Sat 28 Sep '13 14:30    Post subject: Reply with quote

Thanks very much
Back to top


Reply to topic   Topic: redirect url View previous topic :: View next topic
Post new topic   Forum Index -> Apache