solved Page Redirect Issues With .htaccess

alt=
@syrus
10 years ago
44 posts
Before I purchased Jamroom script, i was using wordpress with my same current domain name i'm using with jamroom now. The problem is a lot of urls for my pages has changed, because I'm no longer using wordpress, im using the jamroom script. I'm trying to redirect all the urls that no longer exist that resides on the same exact domain im using now, to the new urls that have been created with jamroom inside the htaccess. The problem is the url of the pages i'm redirecting, keeps going through the router and the router url keeps showing inside the page url link, preventing the page from redirecting. Please Help, any support will be so much appreciated with this issue.

Please Note: I currently have my site set to force all users to the www. version of my domain in the .htaccess. but the problem still exist even if I remove it as well.
updated by @syrus: 03/26/14 08:24:38AM
brian
@brian
10 years ago
10,148 posts
You just want to do something like this:

RewriteRule ^old_page/whatever(.*)$ /new/url [R=301,L]

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@syrus
10 years ago
44 posts
Thanks for responding @brian. The code you have above is not working for me. The url is no longer showing the router url inside of it. Its still not redirecting and it gives a "Not Found" Page Error.
alt=
@syrus
10 years ago
44 posts
Thanks @Brian, I figured it out. Your code above was correct, i just had to include the http before the new page url and also, it wont work, if its not before everything else in the .htaccess file. It has to be first at the top.
brian
@brian
10 years ago
10,148 posts
Sounds good - glad you got that fixed up ;)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags