2399Skillz
10-27-2008, 09:25 PM
Alright guys, I am having some issues here:
I want to redirect some pages to a new location, but I can't seem to get it to work correctly.
This is the page I want to redirect: http://www.sitename.com/maps/?page=25&sort=1
This is where I want it to redirect to: http://www.sitename.com/downloads.php
This is what I have in the .htaccess file. Redirect 301 /maps http://www.sitename.com/downloads.php
This is what it redirects to when I go to the redirected page. http://www.sitename.com/downloads.php/?page=25&sort=1
Now, the problem is it places the /?page=25&sort=1 at the end of the url it redirects to. How do I drop that?
anon-e-mouse
10-27-2008, 09:54 PM
Have you tried Redirect 301 http://www.sitename.com/maps/?page=25&sort=1 http://www.sitename.com/downloads.php or /maps/?page=25&sort=1 http://www.sitename.com/downloads.php?
2399Skillz
10-27-2008, 09:58 PM
Redirect 301 http://www.sitename.com/maps/?page=25&sort=1 http://www.sitename.com/downloads.php
Just goes to a 404
Redirect 301 /maps/?page=25&sort=1 http://www.sitename.com/downloads.php?
Just goes to a 404 also.
Shaun [WhirlHost]
10-28-2008, 03:08 AM
Wait... If it gives a 404 then it's working, because if I just go straight to http://www.sitename.com/downloads.php it also gives a 404.
Upload a downloads.php file then try.
2399Skillz
10-28-2008, 03:10 AM
sitename was just replacing my domain
If I go to mysite.com/downloads.php then it'll take me to my downloads page.
Shaun [WhirlHost]
10-28-2008, 03:12 AM
Oh :P
Sorry, me being absolutely dumb.
I would have a look at www.dynamicdrive.com too ;)
2399Skillz
10-28-2008, 03:42 AM
Well if i just go to mysite.com/downloads.php/? then it messes up all the formatting on the page. images do not load, table colors are all white, etc...
This is what I have in the .htaccess file.
Redirect 301 /maps http://www.sitename.com/downloads.php
This works perfectly. The only problem is it adds the rest of the URL to the end, if there was something that could be done that would drop that, it would be prefect.
2399Skillz
10-28-2008, 03:51 AM
Sweet, I figured it out.
Redirect 301 /maps/ http://www.mysite.com/downloads.php
This will still place the ?page=25&sort=1 at the end of the new URL, but it'll still load the page just fine. So it'll work for now.
Ceetoe
10-28-2008, 04:10 AM
Congratulations on getting it to work.
2399Skillz
10-28-2008, 04:22 AM
Congratulations on getting it to work.
Thank you guys for helping me along. I never realized that just adding one character here and there would make a difference, so I started trying it and sure enough, it worked.
Would really like to get it to not display that extra "dynamic" url stuff up at the top, but it goes away once you click on a category anyway. No harm in that. :agree:
Shaun [WhirlHost]
10-28-2008, 04:47 AM
Well done :agree:
Wouldn't have thought of that myself.