Graficko.com

Plesk – Redirecting a URL

by on Feb.10, 2009, under Work

Being most familiarized with Cpanel I always thought this task would be simple in Plesk as well, at least from what I’ve read in some blogs and forums Plesk seamed awesome and simple enough to get a website up and running in no time.

I would be so lucky, at least in the hosting provider I am working with no simple click and save options in order to get a redirection done. After a few e-mails exchange with the provider in order for him to show me if this could be done by any other method, they pretty said it could by did not provide any help or example what so ever. (Probably my question should be issued in a command voice in order for them to get my point).

Well no problem just create a .htaccess file under you public root and you will be fine.
In my case I want to redirect all traffic coming in the main URL to a directory under the public root directory (usually public_html or httpdocs) so in the newly created file just put in the following code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
# Rules for MY_SITE
RewriteRule ^/?$ http://www.mydomain.com/my_directory [R=302,L]

Now let me just try it on a browser to make sure, and I’m all set.

Time to get back to work.. :)

:,

3 Comments for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...