flashpipe Posted February 1, 2010 Share Posted February 1, 2010 I'm thinking this should be an easy thing...BUT, lol... Anyway, I've got a client that is migrating their site from an existing url (url1) to a new url (url2) and they want anyone that enters a location from their previous site to be directed to the "blog" folder on their new site. So, if someone types in http://www.url1.com they go to http://www.url2.com/blog/ if they enter http://www.url1.com/category/cat1/ they go to http://www.url2.com/blog/category/cat1/ I created the following file, named it .htaccess and uploaded it to the root at their old url...and nothing seems to work differently?? Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www.url1.com$ RewriteRule ^(.*)$ http://www.url2.com/blog/$1 [R=301,L] Any ideas?? Thanks!!! Quote Link to comment https://forums.phpfreaks.com/topic/190572-htaccess-issue/ Share on other sites More sharing options...
cags Posted February 1, 2010 Share Posted February 1, 2010 If it's in the root file of the old site, what happens if you remove the RewriteCond? Quote Link to comment https://forums.phpfreaks.com/topic/190572-htaccess-issue/#findComment-1005212 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.