Can't redirect files with spaces in the name

Vigothe6th

Registered
Oct 3, 2006
3
0
151
The person that ran the company's site before me used many needless pdf files and had spaces and ampersands in the file names. I am now trying to redirect the old files to point to html files using cpanel. The few old files that did not have spaces are redirecting fine but those that have them don't work. If I type in the url of a page that had a space I get a 404 error.
Example:
Old location: http://www.mydomain.com/Brochures/Trucks & installations/Specialty Installations Brochure.pdf
New location: http://www.mydomain.com/atv.html

Cpanel automaticaly converts the spaces to %20 so I thought that maybe the ampersand was the problem so I manually changed that to %26 but still have had no luck.

What am I missing?
 

angelina_holy

Well-Known Member
Aug 6, 2006
113
0
166
Kindly login to filemanger and remove the spaces in the files say Trucks & installations

Rename the file Trucks & installations as Trucks&installations and then set the redirection . from cpanel>>redirect
 

Vigothe6th

Registered
Oct 3, 2006
3
0
151
But the problem is people still have bookmarks to the pages with spaces in them and some of the search engines are still listing them even though they have not existed for over a month.
 

webignition

Well-Known Member
Jan 22, 2005
1,876
2
166
You would most likely need to url-encode certain characters for them to work properly:

Code:
http://www.mydomain.com/Brochures/Trucks%20&%20installations/Specialty%20Installations%20Brochure.pdf
Note: The above is just a hint - I merely replaced the spaces with their url-encoded equivalent (%20). You'd probably need to url-encode the ampersand character too.
 

Vigothe6th

Registered
Oct 3, 2006
3
0
151
webignition said:
You would most likely need to url-encode certain characters for them to work properly:

Code:
http://www.mydomain.com/Brochures/Trucks%20&%20installations/Specialty%20Installations%20Brochure.pdf
Note: The above is just a hint - I merely replaced the spaces with their url-encoded equivalent (%20). You'd probably need to url-encode the ampersand character too.
Sorry, my first message wasn't very clear on that part. It looks like Cpanel automatically url-encodes the spaces but I have also done it myself and I have encoded the ampersand as well and still have had no sucess.