| Author |
|
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 25 March 2011 at 6:12am | IP Logged
|
|
|
Hi all,
i use seorule and RewriteRule, the seorule don't rewrite onfly the link, the
rewrite rule is correct because if write the new url on browser it work!
Code:
DBDriver oledb
DBDParams "Provider=SQLOLEDB; Data
Source=XXX.XXX.XXX.XXX,1433;Initial Catalog=XXX;User
Id=XXX;Password=XXX;Locale Identifier=1040"
DBDPrepareSQL "SELECT item FROM dbo.table WHERE id_table=@KEY"
getCategoria
SetEnv mod_seo
RewriteMap SeoCategoria dbd:getCategoria
SeoRule cat_commerce.asp?id_cat=(\d+)$ \$1-
${slug:${SeoCategoria:$1}}.html [Redirect,Scope=A]
RewriteRule ^(\d+)-(.*).html$ cat_commerce.asp?id_cat=$1 [NC,QSA]
|
|
|
Another strange behavior, if add \ in seorule
Code:
SeoRule cat_commerce.asp\?id_cat=(\d+)$ \$1-
${slug:${SeoCategoria:$1}}.html [Redirect,Scope=A] |
|
|
I receive a Internal Error Server....but this is the correct way !
What's wrong?
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 25 March 2011 at 6:24am | IP Logged
|
|
|
Hello.
Could you please provide error.log records. You may find the file in Ape’s installation folder.
What’s the reason of using OLEDB driver? Most likely mod_seo doesn’t work because it can’t connect to the database. Make sure the system where Ape is installed, has OleDB provider for SQL Server.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 25 March 2011 at 6:49am | IP Logged
|
|
|
This my last error!
The connection Db work, because use this link (url rewrite)
http://beta.soloperme.com/5-scarpe.html it work!
The Ape are intalled on server!
[25/03/2011 12:40:16] [ConfigLoader] (4) [/newsletter/NL_230211/2.jpg] c:\inetpub\wwwroot\www.sitename.it\.htaccess(32): Unknown Error in the setenvif_module.
Line: SetEnvIf mime (mime css/.*) gzip=9 cache-enable=disk
Unable to compile regular expression '(mime'. System.ArgumentException: analisi di "(mime" - Parentesi chiuse insufficienti. in corso...
in System.Text.RegularExpressions.RegexParser.ScanRegex()
in System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
in System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, Boolean useCache)
in 0.40.0(String , String , 162 , RegexOptions )
[25/03/2011 12:40:16] [ConfigLoader] (4) [/newsletter/NL_230211/2.jpg] c:\inetpub\wwwroot\www.sitename.it\.htaccess(33): Unknown Error in the setenvif_module.
Line: SetEnvIf mime (mime SpryAssets/.*) gzip=9 cache-enable=disk
Unable to compile regular expression '(mime'. System.ArgumentException: analisi di "(mime" - Parentesi chiuse insufficienti. in corso...
in System.Text.RegularExpressions.RegexParser.ScanRegex()
in System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
in System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, Boolean useCache)
in 0.40.0(String , String , 162 , RegexOptions )
[25/03/2011 12:40:16] [ConfigLoader] (4) [/newsletter/NL_230211/2.jpg] c:\inetpub\wwwroot\www.sitename.it\.htaccess(34): Unknown Error in the setenvif_module.
Line: SetEnvIf mime (mime ScriptLibrary/.*) gzip=9 cache-enable=disk
Unable to compile regular expression '(mime'. System.ArgumentException: analisi di "(mime" - Parentesi chiuse insufficienti. in corso...
in System.Text.RegularExpressions.RegexParser.ScanRegex()
in System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
in System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, Boolean useCache)
in 0.40.0(String , String , 162 , RegexOptions )
[25/03/2011 12:40:16] [ConfigLoader] (4) [/newsletter/NL_230211/2.jpg] c:\inetpub\wwwroot\www.sitename.it\.htaccess(35): Unknown Error in the setenvif_module.
Line: SetEnvIf mime (mime js/.*) gzip=9 cache-enable=disk
Unable to compile regular expression '(mime'. System.ArgumentException: analisi di "(mime" - Parentesi chiuse insufficienti. in corso...
in System.Text.RegularExpressions.RegexParser.ScanRegex()
in System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
in System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, Boolean useCache)
in 0.40.0(String , String , 162 , RegexOptions )
[25/03/2011 12:40:22] [LicenseManager] Credentials for XXXX XXXX are valid
[25/03/2011 12:40:22] [cache_module] items stored in the cache: 0; bytes available for the cache: 2473632202, physical memory limit: 98%
[25/03/2011 12:41:06] [LicenseManager] Credentials for XXXX XXXX are valid
[25/03/2011 12:41:06] [cache_module] items stored in the cache: 0; bytes available for the cache: 2473632202, physical memory limit: 98%
[25/03/2011 12:41:06] [.htaccess] (4) [/cat_commerce.asp] Internal error - exception in seo_module:
Dichiarare la variabile scalare "@KEY".
[25/03/2011 12:41:06] [.htaccess] (4) [/500_try.asp] Internal error - exception in seo_module:
Dichiarare la variabile scalare "@KEY".
[25/03/2011 12:41:10] [expires_module] (4) [/5-scarpe.html] Il server non può accodare l'intestazione dopo l'invio delle intestazioni HTTP.
[25/03/2011 12:41:16] [expires_module] (4) [/2-prova.html] Il server non può accodare l'intestazione dopo l'invio delle intestazioni HTTP.
[25/03/2011 12:41:20] [expires_module] (4) [/5-scarpe.html] Il server non può accodare l'intestazione dopo l'invio delle intestazioni HTTP.
[25/03/2011 12:41:38] [LicenseManager] Credentials for XXXX XXXX are valid
[25/03/2011 12:41:38] [cache_module] items stored in the cache: 0; bytes available for the cache: 2473632202, physical memory limit: 98%
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 25 March 2011 at 8:27am | IP Logged
|
|
|
Hello.
Please make sure you have the latest version of Ape. If you don’t—please upgrade. After upgrade make several requests and grab rewrite.log records as well as error.log records. New version logs access to database.
There is incorrect syntax in SetEnvIf directive:
Code:
| SetEnvIf mime (mime ScriptLibrary/.*) gzip=9 cache-enable=disk |
|
|
It should be as follows:
Code:
| SetEnvIf mime ScriptLibrary/.* gzip=9 cache-enable=disk |
|
|
Please see the documentation of mod_setenvif.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 25 March 2011 at 8:51am | IP Logged
|
|
|
Yes i have purchase and installed Ape yesterday to use any features.
I had already installed isapi rewrite, and is still on the server, and then
yesterday I bought and installed Ape.
Thank you for the correct code of SetEnvIf, scriptlibrary is a folder. however,
is that correct?
Another question but what this error means and how you can solve?
[25/03/2011 12:41:38] [cache_module] items stored in the cache: 0; bytes available for the cache: 2473632202, physical memory limit: 98%
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 25 March 2011 at 9:16am | IP Logged
|
|
|
Quote:
Thank you for the correct code of SetEnvIf, scriptlibrary is a folder. however,
is that correct? |
|
|
No. That SetEnvIf rule has “mime” keyword, so it tests the regular expression ScriptLibrary/.* against current MIME-type.
If you want to enable cache and GZIP for ScriptLibrary directory, please select the directory in Helicon Ape manager and put the following in editor:
Code:
SetEnv gzip 9
SetEnv cache-enable disk
|
|
|
↑ that code will be put into ScriptLibrary/.htaccess file.
Quote:
| [25/03/2011 12:41:38] [cache_module] items stored in the cache: 0; bytes available for the cache: 2473632202, physical memory limit: 98% |
|
|
This line isn’t error. We also write some technical info into error.log.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 25 March 2011 at 9:26am | IP Logged
|
|
|
But the problem of seorule and rewrite what it depends?
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 25 March 2011 at 9:39am | IP Logged
|
|
|
Please provide us with rewrite.log records. Make sure httpd.conf has the following lines:
Code:
RewriteLogLevel 9
LogLevel debug |
|
|
Make several requests and send us error.log and rewrite.log files.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 25 March 2011 at 9:56am | IP Logged
|
|
|
Error.log:
[25/03/2011 15:44:38] [.htaccess] (4) [/cat_commerce.asp] Internal error - exception in seo_module:
Dichiarare la variabile scalare "@KEY".
[25/03/2011 15:44:38] [.htaccess] (4) [/500_try.asp] Internal error - exception in seo_module:
Dichiarare la variabile scalare "@KEY".
rewrite.log is empty
PS: the link http://beta.soloperme.com/5-scarpe.html working properly and is the new url.
But if I click the old url I write I get "500 internal server error" (http://beta.soloperme.com/cat_commerce.asp?id_cat=5) and don't have the linkfreeze effect!
|
| Back to Top |
|
| |
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 28 March 2011 at 2:58am | IP Logged
|
|
|
What is the problem?
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 28 March 2011 at 4:53am | IP Logged
|
|
|
Hello.
Please make sure you have RewriteLogLevel 9 in httpd.conf. Check NTFS permissions for the rewrite.log file. Make sure application user can write to the file.
Without rewrite.log we can’t determine the issue.
Yes, http://beta.soloperme.com/5-scarpe.html may work without database. The rule simply grabs the numeric part:
Code:
| RewriteRule ^(\d+)-(.*).html$ cat_commerce.asp?id_cat=$1 [NC,QSA] |
|
|
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 28 March 2011 at 5:31am | IP Logged
|
|
|
Then rewrite.log have the same permission of the error.log than work
correctly!
i have "resolved" with this code:
Code:
DBDriver mssql
DBDParams "Data Source=XXXX,1433;Initial Catalog=XXX; User
ID=XX;Password=XXX"
DBDPrepareSQL "SELECT item FROM dbo.table WHERE id_table = @KEY"
getCategoria
DBDPrepareSQL "SELECT id_table FROM dbo.table WHERE id_table = @KEY"
getCategoria_id
RewriteEngine On
RewriteBase /
SetEnv mod_seo
RewriteMap SeoCategoria dbd:getCategoria
RewriteMap SeoCategoria_id dbd:getCategoria_id
RewriteMap slug int:slug
SeoRule cat_commerce.asp\?id_cat=(\d+)?$ \${SeoCategoria_id:$1}-
${slug:${SeoCategoria:$1}}.html [Redirect,Scope=A]
RewriteRule ^(\d+)-(.*).html$ cat_commerce.asp?id_cat=$1 [NC,QSA]
|
|
|
And with this work!
But if change the code with the old code i receive the same error, and the
same log error.
But is a best way???
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 28 March 2011 at 5:55am | IP Logged
|
|
|
Please try the following code:
Code:
DBDriver mssql
DBDParams "Data Source=XXXX,1433;Initial Catalog=XXX; User ID=XX;Password=XXX"
DBDPrepareSQL "SELECT item FROM dbo.table WHERE id_table = @KEY" getCategoria
RewriteEngine On
RewriteBase /
SetEnv mod_seo
RewriteMap SeoCategoria dbd:getCategoria
RewriteMap slug int:slug
SeoRule cat_commerce.asp\?id_cat=(\d+)$ $1-${slug:${SeoCategoria:$1}}.html [Redirect,Scope=A]
RewriteRule ^(\d+)-[^.]+\.html$ cat_commerce.asp?id_cat=$1 [NC,QSA,L] |
|
|
Note, you changed DBDriver, which could have been the main problem.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 30 March 2011 at 3:49am | IP Logged
|
|
|
Yes, if change the DBDrive it's work:
Code:
DBDriver mssql
DBDParams "Data Source=XXXXXXX;Initial Catalog=XXXXX;User ID=XXXX;Password=XXXXX"
DBDPrepareSQL "SELECT category FROM dbo.table_category WHERE id_category = @KEY" getCategoria
DBDPrepareSQL "SELECT url_rewrite_product FROM dbo.table_product WHERE id_product = @KEY" getProdotto_URL
RewriteEngine On
RewriteBase /
SetEnv mod_seo
RewriteMap SeoCategoria dbd:getCategoria
RewriteMap SeoProdotto dbd:getProdotto_URL
RewriteMap slug int:slug
#REWRITE URL CATEGORY
SeoRule cat_commerce.asp\?id_category=(\d+)$ /${slug:${SeoCategoria:$1}}-$1.html [Redirect,Scope=A]
RewriteRule ^[^.]+-(\d+)\.html$ cat_commerce.asp?id_category=$1 [NC,QSA,L]
#REWRITE URL PRODUCT
SeoRule dettaglio_prodotto.asp\?id_product=(\d+)$ /$1/${SeoProdotto:$1}.html [Redirect,Scope=A]
RewriteRule ^(\d+)+/(.+).html$ dettaglio_prodotto.asp?id_product=$1 [NC,QSA,L]
|
|
|
Another question, with this method are forced to enter the url rewritten the id_category or id_product or to prevent the ASP code gives error.
Is there a better way to not rewrite the url without the query string in it?
Example URL is now rewritten as (in bold the id_category o id_product):
http://www.mywebsite.com/12/scarpe/derby-allacciato-coda-di-rondine-colore-castagno-due.html
http://www.mywebsite.com/Scarpe-5.html
Example of how I want the url:
http://www.mywebsite.com/scarpe/derby-allacciato-coda-di-rondine-colore-castagno-due.html
http://www.mywebsite.com/Scarpe.html
(of course without ensure that the code gives error)
Thanks a lot
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 30 March 2011 at 4:36am | IP Logged
|
|
|
Hello.
It’s possible, if you pass the string sequence as a key.
Note, free support doesn’t include rules design. You may consider commercial support plan.
Thank you.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
eliofilo Newbie

Joined: 21 March 2011
Online Status: Offline Posts: 19
|
| Posted: 30 March 2011 at 5:15am | IP Logged
|
|
|
the problem is money! damn boss! lol
|
| Back to Top |
|
| |