upgraded to v3
6 posts
• Page 1 of 1
- DesignsOnline
- Posts: 14
- Joined: 27 Apr 2013, 17:11
upgraded to v3
Ive moved a client to a new host and they use v3.
My old host used v2 and so my httpd.ini file isnt working.
Please can someone help me rewrite this for v3?
[ISAPI_Rewrite]
RewriteCond %HTTPS (on)?
RewriteCond Host: (?!www\.)(.+)
RewriteRule (.*) http(?$1s:)\://www.$2$3 [I,RP]
#product rules
RewriteRule /P(\d+).*\-C(\d+)\.asp /productdetails.asp\?ProductID=$1&SubCatagoryID=$2 [I,L]
RewriteRule /P(\d+)-pg(\d+)(.*)\.asp /productdetails.asp\?ProductID=$1 [I,L]
RewriteRule /P(\d+)(.*)\.asp /productdetails.asp\?ProductID=$1 [I,L]
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
My old host used v2 and so my httpd.ini file isnt working.
Please can someone help me rewrite this for v3?
[ISAPI_Rewrite]
RewriteCond %HTTPS (on)?
RewriteCond Host: (?!www\.)(.+)
RewriteRule (.*) http(?$1s:)\://www.$2$3 [I,RP]
#product rules
RewriteRule /P(\d+).*\-C(\d+)\.asp /productdetails.asp\?ProductID=$1&SubCatagoryID=$2 [I,L]
RewriteRule /P(\d+)-pg(\d+)(.*)\.asp /productdetails.asp\?ProductID=$1 [I,L]
RewriteRule /P(\d+)(.*)\.asp /productdetails.asp\?ProductID=$1 [I,L]
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
Re: upgraded to v3
Hello,
Please use the following in your .htaccess under the root of the site:
RewriteBase /
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+)
RewriteRule (.*) http(?%1s:)\://www.$1/$2 [R=301]
#product rules
RewriteRule ^P(\d+).*\-C(\d+)\.asp$ /productdetails.asp?ProductID=$1&SubCatagoryID=$2 [NC,L]
RewriteRule ^P(\d+)-pg(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
RewriteRule ^P(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
Please use the following in your .htaccess under the root of the site:
RewriteBase /
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+)
RewriteRule (.*) http(?%1s:)\://www.$1/$2 [R=301]
#product rules
RewriteRule ^P(\d+).*\-C(\d+)\.asp$ /productdetails.asp?ProductID=$1&SubCatagoryID=$2 [NC,L]
RewriteRule ^P(\d+)-pg(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
RewriteRule ^P(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
- DesignsOnline
- Posts: 14
- Joined: 27 Apr 2013, 17:11
Re: upgraded to v3
Hi Anton,
thanks for the reply. Ive done what you said and I now get an error:
Oops! Google Chrome could not find www.
I should mention that this is running in an account with a temporary URL at the moment.
the URL for the site until it is completed will be something like:
http://mywebsitedomain.co.uk.server.hos ... domain.com
right now I cant access the website at all.
thanks for the reply. Ive done what you said and I now get an error:
Oops! Google Chrome could not find www.
I should mention that this is running in an account with a temporary URL at the moment.
the URL for the site until it is completed will be something like:
http://mywebsitedomain.co.uk.server.hos ... domain.com
right now I cant access the website at all.
- DesignsOnline
- Posts: 14
- Joined: 27 Apr 2013, 17:11
Re: upgraded to v3
ive edited the .htaccess to:
=======================================================================================================================
RewriteEngine on
#product rules
RewriteRule ^P(\d+).*\-C(\d+)\.asp$ /productdetails.asp?ProductID=$1&SubCatagoryID=$2 [NC,L]
RewriteRule ^P(\d+)-pg(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
RewriteRule ^P(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
=======================================================================================================================
This has got some of the site working but some of it still isnt working. the products pages seem to be loading although im having a problem with them. But the Category pages are still not working at all?
=======================================================================================================================
RewriteEngine on
#product rules
RewriteRule ^P(\d+).*\-C(\d+)\.asp$ /productdetails.asp?ProductID=$1&SubCatagoryID=$2 [NC,L]
RewriteRule ^P(\d+)-pg(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
RewriteRule ^P(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
=======================================================================================================================
This has got some of the site working but some of it still isnt working. the products pages seem to be loading although im having a problem with them. But the Category pages are still not working at all?
- DesignsOnline
- Posts: 14
- Joined: 27 Apr 2013, 17:11
Re: upgraded to v3
I noticed that the ones that worked had ^ rather than / in front of them,
so I changed:
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
to
#category rules
RewriteRule ^d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule ^d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
and it worked, thank you so much for your help...
so I changed:
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
to
#category rules
RewriteRule ^d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule ^d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
and it worked, thank you so much for your help...
Re: upgraded to v3
Hello,
I'm sorry, I've made a mistake in the rule. Please try it like this:
RewriteBase /
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+)
RewriteRule (.*) http(?%1s:)://www.%{HTTP_HOST}/$1 [R=301]
#product rules
RewriteRule ^P(\d+).*\-C(\d+)\.asp$ /productdetails.asp?ProductID=$1&SubCatagoryID=$2 [NC,L]
RewriteRule ^P(\d+)-pg(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
RewriteRule ^P(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
I'm sorry, I've made a mistake in the rule. Please try it like this:
RewriteBase /
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+)
RewriteRule (.*) http(?%1s:)://www.%{HTTP_HOST}/$1 [R=301]
#product rules
RewriteRule ^P(\d+).*\-C(\d+)\.asp$ /productdetails.asp?ProductID=$1&SubCatagoryID=$2 [NC,L]
RewriteRule ^P(\d+)-pg(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
RewriteRule ^P(\d+)(.*)\.asp$ /productdetails.asp?ProductID=$1 [NC,L]
#category rules
RewriteRule /d(\d+)-pg(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,RP,L]
RewriteRule /d(\d+)(.*?)/? /Products.asp\?SubCatagoryID=$1 [I,L]
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests