redirecting specific documents

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 27 Jul 2012, 13:56

redirecting specific documents

27 Jul 2012, 14:10

Hi,

I'm trying to redirect urls for specific documents in the same directory (where old documents have been deleted/replaced) but this doesn't work? I'm a complete newb to ISAPI but have a whole batch of these to redirect;


RewriteEngine on
RewriteRule ^/Content/File/PDF/old_doc.pdf$ /Content/File/PDF/new-doc.pdf [R=301,L]

Help greatly appreciated.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: redirecting specific documents

30 Jul 2012, 06:35

Hello,

In case that's rule is in .htacces file, try using the following instead:

Code: Select all
RewriteEngine on
RewriteRule ^Content/File/PDF/old_doc\.pdf$ /Content/File/PDF/new-doc.pdf [NC,R=301,L]


Regards
Andrew

User avatar
Posts: 2
Joined: 27 Jul 2012, 13:56

Re: redirecting specific documents

30 Jul 2012, 07:39

Hi, thanks for the reply Andrew.

I've tried that, but it doesn't work either... ?

Thanks

Simon

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: redirecting specific documents

30 Jul 2012, 10:32

Than lets go to the httpd.conf and run the testing rule as described in FAQ.
Than you may enable logging and see error.log and rewrite.log and provide us with the log for the testing request.

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 11 guests