Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am setting up a new Plesk account and want to add a custom error document, 404, specifying a URL to a PHP file.

In another account, which uses an earlier version of Plesk (v10, if not mistaken), the following method works, just not in Plesk 11.

  1. Go to Websites & Domains | Virtual Directories
  2. [Manage] for domain
  3. Select 'Error Documents' tab
  4. Click on All | click on 404
  5. Select Url as the Type
  6. Type in '/Index.php' as the Location
  7. List item

Note, file is in root of the selected domain.

Received error:

Error: Wrong URL format. Please enter an absolute URL within the virtual host (site).
Location is highlighted

In previous versions of Plesk, or at least in the other account, specifying "/Index.php" worked.

If I were using ASP.Net, I could probably modify the web.config file, however I am using PHP here, not ASP.Net.

Thoughts?

share|improve this question
    
What is your operating system (Windows or Linux) ? –  cept0 Jun 17 '13 at 6:32
    
Windows, sorry for not mentioning it. –  Sarah Weinberger Jun 17 '13 at 11:58
    
why don't you contact the Parallels Plesk Support ? –  cept0 Jun 22 '13 at 19:37

1 Answer 1

Well, it looks like behaviour was changed. What about add permanent redirect in not_found.html file or use absolute URL to index.php?

share|improve this answer
    
I was able to add in an absolute path in the form, <domain name here>/Index.php, however I have a couple of URLs that use the same domain name and I was hoping to keep a relative path. using the domain1.com/Index.php will redirect users from domain2.com. I thought of this answer yesterday, but did not try it. I added that in for now. –  Sarah Weinberger Jun 12 '13 at 17:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.