Fakass Posted November 4, 2017 Share Posted November 4, 2017 Hello, I have prestashop 1.7 on my windows serveur 2008R2. I try to write url rewriting rules on the web.config. I found some versions but all have the same mistake : Products pages are in "404 error". All others pages seems to work fine. Maybe this web.config don't work with the 1.7 version. Someone have the good version? My version : <rewrite> <rules> <rule name="Imported Rule 1" stopProcessing="true"> <match url="^api/?(.*)$" ignoreCase="false" /> <action type="Rewrite" url="webservice/dispatcher.php?url={R:1}" appendQueryString="true" /> </rule> <rule name="Imported Rule 2" stopProcessing="true"> <match url="^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}-{R:2}{R:3}{R:4}.jpg" /> </rule> <rule name="Imported Rule 3" stopProcessing="true"> <match url="^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}-{R:2}{R:3}.jpg" /> </rule> <rule name="Imported Rule 4" stopProcessing="true"> <match url="^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}/{R:1}{R:2}{R:3}.jpg" /> </rule> <rule name="Imported Rule 5" stopProcessing="true"> <match url="^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}/{R:2}/{R:1}{R:2}{R:3}{R:4}.jpg" /> </rule> <rule name="Imported Rule 6" stopProcessing="true"> <match url="^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}/{R:2}/{R:3}/{R:1}{R:2}{R:3}{R:4}{R:5}.jpg" /> </rule> <rule name="Imported Rule 7" stopProcessing="true"> <match url="^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}/{R:2}/{R:3}/{R:4}/{R:1}{R:2}{R:3}{R:4}{R:5}{R:6}.jpg" /> </rule> <rule name="Imported Rule 8" stopProcessing="true"> <match url="^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}/{R:2}/{R:3}/{R:4}/{R:5}/{R:1}{R:2}{R:3}{R:4}{R:5}{R:6}{R:7}.jpg" /> </rule> <rule name="Imported Rule 9" stopProcessing="true"> <match url="^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}/{R:2}/{R:3}/{R:4}/{R:5}/{R:6}/{R:1}{R:2}{R:3}{R:4}{R:5}{R:6}{R:7}{R:8}.jpg" /> </rule> <rule name="Imported Rule 10" stopProcessing="true"> <match url="^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}/{R:2}/{R:3}/{R:4}/{R:5}/{R:6}/{R:7}/{R:1}{R:2}{R:3}{R:4}{R:5}{R:6}{R:7}{R:8}{R:9}.jpg" /> </rule> <rule name="Imported Rule 11" stopProcessing="true"> <match url="^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/p/{R:1}/{R:2}/{R:3}/{R:4}/{R:5}/{R:6}/{R:7}/{R:8}/{R:1}{R:2}{R:3}{R:4}{R:5}{R:6}{R:7}{R:8}{R:9}{R:1}0.jpg" /> </rule> <rule name="Imported Rule 12" stopProcessing="true"> <match url="^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/c/{R:1}{R:2}{R:3}.jpg" /> </rule> <rule name="Imported Rule 13" stopProcessing="true"> <match url="^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$" ignoreCase="false" /> <action type="Rewrite" url="img/c/{R:1}{R:2}.jpg" /> </rule> <rule name="Imported Rule 14" stopProcessing="true"> <match url="^.*$" /> <conditions logicalGrouping="MatchAny"> <add input="{REQUEST_FILENAME}" matchType="IsFile" pattern="" ignoreCase="false" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" pattern="" ignoreCase="false" /> </conditions> <action type="None" /> </rule> <rule name="Imported Rule 15" stopProcessing="true"> <match url="^.*$" /> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> Thanks in advance! Link to comment Share on other sites More sharing options...
Fakass Posted November 4, 2017 Author Share Posted November 4, 2017 PS: My exact version is : prestashop 1.7.2.4 Link to comment Share on other sites More sharing options...
selectshop.at Posted November 4, 2017 Share Posted November 4, 2017 Why you don't translate .htaccess with rewrite tool from IIS Manager ? If you used it, than which is your problem exactly ? URL to your site for to visualize the problem. https://docs.microsoft.com/en-us/iis/install/installing-iis-7/installing-iis-7-and-above-on-windows-server-2008-or-windows-server-2008-r2 BTW: I suggest to don't use Prestashop on Windows Servers. There are several writing problems with this kind of servers. Prestashop is 100% Linux compatible and Windows servers 100% Microsoft products compatible. Prestashop needs flexible rights set file based, which windows servers do not fulfill. On Windows Servers you can set only global rights. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now