cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a .htaccess file on this server that I can edit to redirect old URL's?

oldgustav
Grafter
Posts: 52
Registered: ‎30-07-2007

Is there a .htaccess file on this server that I can edit to redirect old URL's?

I'm having problems with old URL's lead to 404 error pages and have been advised that one solution is to redirect the old URL's to the new pages by editing the .htaccess file and using the command: Redirect 301 /page2/page2.html http://www.typarke.co.uk/camping-holidays/camping-in-tents.html (real example of what I need to achieve).
I have had a scout around for .htaccess in the Plesk control panel but cannot find one. Can anyone please help?
8 REPLIES 8
gilbertG
Dabbler
Posts: 23
Registered: ‎16-01-2009

Re: Is there a .htaccess file on this server that I can edit to redirect old URL's?

you just create one in your httpdocs directory and add what you need.
they can be a bit tricky to get right but if you google for what you want to do you should be able to find some examples as it's a pretty common thing to do.
Hope that helps.
oldgustav
Grafter
Posts: 52
Registered: ‎30-07-2007

Re: Is there a .htaccess file on this server that I can edit to redirect old URL's?

Thanks very much for your reply. One other thing, does it matter what I call the .htaccess file? Can I call it something like 'redirect.htaccess'? Thanks for your help.
paulcobb
Grafter
Posts: 146
Registered: ‎30-07-2007

Re: Is there a .htaccess file on this server that I can edit to redirect old URL's?

Quote
does it matter what I call the .htaccess file?

Yes it does, it must be called .htaccess and remember that you need to create it using a text editor such as Wordpad, that will not create spurious formatting characters and the like!
gilbertG
Dabbler
Posts: 23
Registered: ‎16-01-2009

Re: Is there a .htaccess file on this server that I can edit to redirect old URL's?

you have to call it .htaccess
oldgustav
Grafter
Posts: 52
Registered: ‎30-07-2007

Re: Is there a .htaccess file on this server that I can edit to redirect old URL's?

But do I need to add a prefix to .htaccess? I only ask because when I save '.htaccess' on Mac OS the OS hides the file because '.' is reserved for system files. I can view them if I use terminal to show hidden system files and upload it that way I suppose.
paulcobb
Grafter
Posts: 146
Registered: ‎30-07-2007

Re: Is there a .htaccess file on this server that I can edit to redirect old URL's?

Nothing else needed.
That is correct, it is a system file and is hidden.
When you have copied it across to the server double-check that the file name is still .htaccess.
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: Is there a .htaccess file on this server that I can edit to redirect old URL's?

I tend to save it on the Mac as my.htaccess, or whatever, and then remove the "my" having uploaded it. Easier for editing.
Gabe
oldgustav
Grafter
Posts: 52
Registered: ‎30-07-2007

Re: Is there a .htaccess file on this server that I can edit to redirect old URL's?

Top tip Gabe - and thanks very much to all that have helped me with this one.