RewriteRule problem
5 posts
• Page 1 of 1
RewriteRule problem
Hi everybody.
I have problem with RewriteRule (ISAPI Lite , IIS 6).
I have several websites on IIS and want to add rules for one page www.domain.pl
The first part (non www to www) works great.
The second part (friendly links) doesn't work.
This is my httpd.conf:
RewriteEngine On
RewriteCond %{HTTP_HOST} .*domain.pl
RewriteCond %{HTTP_HOST} !^www\.domain\.pl
RewriteRule (.*) http://www.domain.pl$1 [R=301,L]
RewriteCond %{HTTP_HOST} .*domain.pl
RewriteRule ^o_firmie.html$ index.php?id_strony=1 [NC,L,QSA]
Can you tell my what i do wrong?
I have problem with RewriteRule (ISAPI Lite , IIS 6).
I have several websites on IIS and want to add rules for one page www.domain.pl
The first part (non www to www) works great.
The second part (friendly links) doesn't work.
This is my httpd.conf:
RewriteEngine On
RewriteCond %{HTTP_HOST} .*domain.pl
RewriteCond %{HTTP_HOST} !^www\.domain\.pl
RewriteRule (.*) http://www.domain.pl$1 [R=301,L]
RewriteCond %{HTTP_HOST} .*domain.pl
RewriteRule ^o_firmie.html$ index.php?id_strony=1 [NC,L,QSA]
Can you tell my what i do wrong?
Re: RewriteRule problem
Please fix your rules like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} .*domain\.pl
RewriteCond %{HTTP_HOST} !^www\.domain\.pl
RewriteRule (.*) http://www.domain.pl$1 [R=301,L]
RewriteCond %{HTTP_HOST} .*domain\.pl
RewriteRule ^/o_firmie.html$ /index.php?id_strony=1 [NC,L,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} .*domain\.pl
RewriteCond %{HTTP_HOST} !^www\.domain\.pl
RewriteRule (.*) http://www.domain.pl$1 [R=301,L]
RewriteCond %{HTTP_HOST} .*domain\.pl
RewriteRule ^/o_firmie.html$ /index.php?id_strony=1 [NC,L,QSA]
Re: RewriteRule problem
Thank You for response.
Still no result.
Here is log:
(2) init rewrite engine with requested uri /index.php?id_strony=1
(1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
(3) applying pattern '(.*)' to uri '/index.php'
(4) RewriteCond: input='www.domain.pl' pattern='.*domain\.pl' => matched
(4) RewriteCond: input='www.domain.pl' pattern='!^www\.domain\.pl' => not-matched
(3) applying pattern '^/o_firmie.html$' to uri '/index.php'
Any suggestions?
Still no result.
Here is log:
(2) init rewrite engine with requested uri /index.php?id_strony=1
(1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
(3) applying pattern '(.*)' to uri '/index.php'
(4) RewriteCond: input='www.domain.pl' pattern='.*domain\.pl' => matched
(4) RewriteCond: input='www.domain.pl' pattern='!^www\.domain\.pl' => not-matched
(3) applying pattern '^/o_firmie.html$' to uri '/index.php'
Any suggestions?
Re: RewriteRule problem
Hello,
What request do you make? The part of the log you show tells that you request /index.php?id_strony=1, while I believe you are supposed to request /o_firmie.html and get the content of /index.php?id_strony=1 with the help of rewriting. Please clarify.
What request do you make? The part of the log you show tells that you request /index.php?id_strony=1, while I believe you are supposed to request /o_firmie.html and get the content of /index.php?id_strony=1 with the help of rewriting. Please clarify.
Re: RewriteRule problem
Of course you are right!
My mistake. Thank you for your help in solving my problem.
My mistake. Thank you for your help in solving my problem.
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests