Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.