ReWriteRule Issue
7 posts
• Page 1 of 1
ReWriteRule Issue
Please help! I’m new to ISAPI_ReWrite and completely confussed!
I have redesigned my website and changed the location of files to a new directory. Therefore need to redirect any page request to the new location.
After looking through the ISAPI_Rewrite documentation the following script was created, but unfortunately I cannot get the redirect to work.
[ISAPI_Rewrite]
RewriteCond Host: www\.damp-meter-direct\.co\.uk
RewriteEngine on
RewriteRule /Articles/How_to_measure_moisture_in_floors\.pdf$ http\:www\.damp-meter-direct\.co\.uk/PDF/Articles/How_to_measure_moisture_in_floors\.pdf$1 [L,RP]
Thanks
I have redesigned my website and changed the location of files to a new directory. Therefore need to redirect any page request to the new location.
After looking through the ISAPI_Rewrite documentation the following script was created, but unfortunately I cannot get the redirect to work.
[ISAPI_Rewrite]
RewriteCond Host: www\.damp-meter-direct\.co\.uk
RewriteEngine on
RewriteRule /Articles/How_to_measure_moisture_in_floors\.pdf$ http\:www\.damp-meter-direct\.co\.uk/PDF/Articles/How_to_measure_moisture_in_floors\.pdf$1 [L,RP]
Thanks
Re: ReWriteRule Issue
Hello,
Please try to fix your config like this:
[ISAPI_Rewrite]
RewriteCond Host: www\.damp-meter-direct\.co\.uk
RewriteRule /Articles/How_to_measure_moisture_in_floors\.pdf$ http\://www.damp-meter-direct.co.uk/PDF/Articles/How_to_measure_moisture_in_floors\.pdf [I,RP]
Please try to fix your config like this:
[ISAPI_Rewrite]
RewriteCond Host: www\.damp-meter-direct\.co\.uk
RewriteRule /Articles/How_to_measure_moisture_in_floors\.pdf$ http\://www.damp-meter-direct.co.uk/PDF/Articles/How_to_measure_moisture_in_floors\.pdf [I,RP]
Re: ReWriteRule Issue
Hello, Ian
Please confirm you are using ISAPI_Rewrite 2 not 3.
Then please have another small fix to the config:
[ISAPI_Rewrite]
RewriteCond Host: www\.damp-meter-direct\.co\.uk
RewriteRule /Articles/How_to_measure_moisture_in_floors\.pdf http\://www.damp-meter-direct.co.uk/PDF/Articles/How_to_measure_moisture_in_floors.pdf [I,RP]
And provide the test request you make and how you want the resulting URL to look like.
Please confirm you are using ISAPI_Rewrite 2 not 3.
Then please have another small fix to the config:
[ISAPI_Rewrite]
RewriteCond Host: www\.damp-meter-direct\.co\.uk
RewriteRule /Articles/How_to_measure_moisture_in_floors\.pdf http\://www.damp-meter-direct.co.uk/PDF/Articles/How_to_measure_moisture_in_floors.pdf [I,RP]
And provide the test request you make and how you want the resulting URL to look like.
Re: ReWriteRule Issue
Thank you
After the hosting provider confirming that it was v2, they have now told me its v3! Not happy :-{
Thank you for your help. Now lets try the script again!!!
After the hosting provider confirming that it was v2, they have now told me its v3! Not happy :-{
Thank you for your help. Now lets try the script again!!!
Re: ReWriteRule Issue
Ok, that makes sense. Please try the following config then:
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.damp-meter-direct\.co\.uk$ [NC]
RewriteRule ^Articles/How_to_measure_moisture_in_floors\.pdf$ /PDF/Articles/How_to_measure_moisture_in_floors.pdf [NC,R=301,L]
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.damp-meter-direct\.co\.uk$ [NC]
RewriteRule ^Articles/How_to_measure_moisture_in_floors\.pdf$ /PDF/Articles/How_to_measure_moisture_in_floors.pdf [NC,R=301,L]
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests