Jump to content

htaccess issue


flashpipe

Recommended Posts

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!!!

Link to comment
https://forums.phpfreaks.com/topic/190572-htaccess-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.