Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
Hello Tom, After tweaking the search pattern, the rule are working fine. Thanks for your tips and thanks to all who has given me the clue. - best wishes On 27-May-2013, at 12:34 PM, Joydeep Bakshi wrote: > Hello Tom, > > sorry for the wrong implementation of the rules. > > This time I have done it as per requirement > > actual url > http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 > > it should be > http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 > > The &L=5 has to be appended > > .htaccess > = > > RewriteCond %{QUERY_STRING} ^id=7&artId=7572&doi=10.5414/ALP33211$ > RewriteRule index.php index.php?L=5 [QSA,R=301] > > Log > = > RewriteCond: > input='http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211' > pattern='highest-credit' [NC] => not-matched > RewriteCond: input='' pattern='^id=7&artId=7572&doi=10.5414/ALP33211$' => > not-matched > > When the require patter need to be compared the input becomes null !!! > Could you kindly explain ? > > Thanks > > > > > > On 24-May-2013, at 8:50 PM, Tom Evans wrote: > >> On Fri, May 24, 2013 at 3:37 PM, Joydeep Bakshi >> wrote: >>> >>> >>> On 24-May-2013, at 6:46 PM, Tom Evans wrote: >>> On Fri, May 24, 2013 at 2:03 PM, Joydeep Bakshi wrote: > It was level 5 and now I have set level 9. > From log it seems that the pattern is blindly applied to every link rather > than matching the query_string > > applying pattern '^ALP33211$' to uri 'index.php' > applying pattern '^ALP33211$' to uri > 'uploads/repository/02/1276_cn74_1001.gif' > applying pattern '^ALP33211$' to uri > 'fileadmin/templates/images/btnAddCart.png' That cannot be correct, At log level 9, the rewrite log would contain a mass of information for a single request, where as you are showing only one line per request. Please do not trim the log contents or decide what is important and what is not, show the entire rewrite log for a single request that should be rewritten. > …….. > …. > > where te ruleset I have at .htaccess is > > RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ > RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] > > The actual url is > http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 > > and it has to become > > http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 > The URL is "/index.php". Everything else is part of the query string. Your RewriteRule is predicated on the URL "/ALP33211", and so is ignored. In a .htaccess, you must also not specify the leading '/' either. Please do show the correct log entries, but this should work (untested): RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ RewriteRule index.php index.php?L=5 [QSA,R=301] Cheers Tom >>> >>> Hello Tom, >>> >>> applied your rules at .htaccess but no luck. >>> >>> The log says as follows >>> >>> 122.176.30.116 - - [24/May/2013:16:02:13 +0200] >>> [www.mydomain.com/sid#7f251146d330][rid#7f251191fa18/initial] (4) [perdir >>> /srv/www/htdocs/mydomain/] RewriteCond: >>> input='id=7&artId=7572&doi=10.5414/ALP33211' >>> pattern='^Id=7572&doi=10.5414/ALP33211$' => not-matched >> >> >> Seems pretty clear, don't you think? >> >> input='id=7&artId=7572&doi=10.5414/ALP33211' >> pattern='^Id=7572&doi=10.5414/ALP33211$' >> >> Cheers >> >> Tom >> >> - >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >> For additional commands, e-mail: users-h...@httpd.apache.org >> >
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
Hello Tom, sorry for the wrong implementation of the rules. This time I have done it as per requirement actual url http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 it should be http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 The &L=5 has to be appended .htaccess = RewriteCond %{QUERY_STRING} ^id=7&artId=7572&doi=10.5414/ALP33211$ RewriteRule index.php index.php?L=5 [QSA,R=301] Log = RewriteCond: input='http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211' pattern='highest-credit' [NC] => not-matched RewriteCond: input='' pattern='^id=7&artId=7572&doi=10.5414/ALP33211$' => not-matched When the require patter need to be compared the input becomes null !!! Could you kindly explain ? Thanks On 24-May-2013, at 8:50 PM, Tom Evans wrote: > On Fri, May 24, 2013 at 3:37 PM, Joydeep Bakshi > wrote: >> >> >> On 24-May-2013, at 6:46 PM, Tom Evans wrote: >> >>> On Fri, May 24, 2013 at 2:03 PM, Joydeep Bakshi >>> wrote: It was level 5 and now I have set level 9. From log it seems that the pattern is blindly applied to every link rather than matching the query_string applying pattern '^ALP33211$' to uri 'index.php' applying pattern '^ALP33211$' to uri 'uploads/repository/02/1276_cn74_1001.gif' applying pattern '^ALP33211$' to uri 'fileadmin/templates/images/btnAddCart.png' >>> >>> That cannot be correct, At log level 9, the rewrite log would contain >>> a mass of information for a single request, where as you are showing >>> only one line per request. >>> >>> Please do not trim the log contents or decide what is important and >>> what is not, show the entire rewrite log for a single request that >>> should be rewritten. >>> >>> …….. …. where te ruleset I have at .htaccess is RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] The actual url is http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 and it has to become http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 >>> >>> The URL is "/index.php". Everything else is part of the query string. >>> Your RewriteRule is predicated on the URL "/ALP33211", and so is >>> ignored. In a .htaccess, you must also not specify the leading '/' >>> either. >>> >>> Please do show the correct log entries, but this should work (untested): >>> >>> RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ >>> RewriteRule index.php index.php?L=5 [QSA,R=301] >>> >>> Cheers >>> >>> Tom >> >> Hello Tom, >> >> applied your rules at .htaccess but no luck. >> >> The log says as follows >> >> 122.176.30.116 - - [24/May/2013:16:02:13 +0200] >> [www.mydomain.com/sid#7f251146d330][rid#7f251191fa18/initial] (4) [perdir >> /srv/www/htdocs/mydomain/] RewriteCond: >> input='id=7&artId=7572&doi=10.5414/ALP33211' >> pattern='^Id=7572&doi=10.5414/ALP33211$' => not-matched > > > Seems pretty clear, don't you think? > > input='id=7&artId=7572&doi=10.5414/ALP33211' > pattern='^Id=7572&doi=10.5414/ALP33211$' > > Cheers > > Tom > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org >
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
On Fri, May 24, 2013 at 3:37 PM, Joydeep Bakshi wrote: > > > On 24-May-2013, at 6:46 PM, Tom Evans wrote: > >> On Fri, May 24, 2013 at 2:03 PM, Joydeep Bakshi >> wrote: >>> It was level 5 and now I have set level 9. >>> From log it seems that the pattern is blindly applied to every link rather >>> than matching the query_string >>> >>> applying pattern '^ALP33211$' to uri 'index.php' >>> applying pattern '^ALP33211$' to uri >>> 'uploads/repository/02/1276_cn74_1001.gif' >>> applying pattern '^ALP33211$' to uri >>> 'fileadmin/templates/images/btnAddCart.png' >> >> That cannot be correct, At log level 9, the rewrite log would contain >> a mass of information for a single request, where as you are showing >> only one line per request. >> >> Please do not trim the log contents or decide what is important and >> what is not, show the entire rewrite log for a single request that >> should be rewritten. >> >> >>> …….. >>> …. >>> >>> where te ruleset I have at .htaccess is >>> >>> RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ >>> RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] >>> >>> The actual url is >>> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 >>> >>> and it has to become >>> >>> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 >>> >> >> The URL is "/index.php". Everything else is part of the query string. >> Your RewriteRule is predicated on the URL "/ALP33211", and so is >> ignored. In a .htaccess, you must also not specify the leading '/' >> either. >> >> Please do show the correct log entries, but this should work (untested): >> >> RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ >> RewriteRule index.php index.php?L=5 [QSA,R=301] >> >> Cheers >> >> Tom > > Hello Tom, > > applied your rules at .htaccess but no luck. > > The log says as follows > > 122.176.30.116 - - [24/May/2013:16:02:13 +0200] > [www.mydomain.com/sid#7f251146d330][rid#7f251191fa18/initial] (4) [perdir > /srv/www/htdocs/mydomain/] RewriteCond: > input='id=7&artId=7572&doi=10.5414/ALP33211' > pattern='^Id=7572&doi=10.5414/ALP33211$' => not-matched Seems pretty clear, don't you think? input='id=7&artId=7572&doi=10.5414/ALP33211' pattern='^Id=7572&doi=10.5414/ALP33211$' Cheers Tom - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
The input isn't how you described it, right? On Fri, May 24, 2013 at 10:37 AM, Joydeep Bakshi wrote: > > > On 24-May-2013, at 6:46 PM, Tom Evans wrote: > >> On Fri, May 24, 2013 at 2:03 PM, Joydeep Bakshi >> wrote: >>> It was level 5 and now I have set level 9. >>> From log it seems that the pattern is blindly applied to every link rather >>> than matching the query_string >>> >>> applying pattern '^ALP33211$' to uri 'index.php' >>> applying pattern '^ALP33211$' to uri >>> 'uploads/repository/02/1276_cn74_1001.gif' >>> applying pattern '^ALP33211$' to uri >>> 'fileadmin/templates/images/btnAddCart.png' >> >> That cannot be correct, At log level 9, the rewrite log would contain >> a mass of information for a single request, where as you are showing >> only one line per request. >> >> Please do not trim the log contents or decide what is important and >> what is not, show the entire rewrite log for a single request that >> should be rewritten. >> >> >>> …….. >>> …. >>> >>> where te ruleset I have at .htaccess is >>> >>> RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ >>> RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] >>> >>> The actual url is >>> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 >>> >>> and it has to become >>> >>> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 >>> >> >> The URL is "/index.php". Everything else is part of the query string. >> Your RewriteRule is predicated on the URL "/ALP33211", and so is >> ignored. In a .htaccess, you must also not specify the leading '/' >> either. >> >> Please do show the correct log entries, but this should work (untested): >> >> RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ >> RewriteRule index.php index.php?L=5 [QSA,R=301] >> >> Cheers >> >> Tom > > Hello Tom, > > applied your rules at .htaccess but no luck. > > The log says as follows > > 122.176.30.116 - - [24/May/2013:16:02:13 +0200] > [www.mydomain.com/sid#7f251146d330][rid#7f251191fa18/initial] (4) [perdir > /srv/www/htdocs/mydomain/] RewriteCond: > input='id=7&artId=7572&doi=10.5414/ALP33211' > pattern='^Id=7572&doi=10.5414/ALP33211$' => not-matched > 122.176.30.116 - - [24/May/2013:16:02:14 +0200] > [www.mydomain.com/sid#7f251146d330][rid#7f251193cc20/initial/redir#1] (4) > [perdir /srv/www/htdocs/mydomain/] RewriteCond: input='' > pattern='^Id=7572&doi=10.5414/ALP33211$' => not-matched > > > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > -- Eric Covener cove...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
On 24-May-2013, at 6:46 PM, Tom Evans wrote: > On Fri, May 24, 2013 at 2:03 PM, Joydeep Bakshi > wrote: >> It was level 5 and now I have set level 9. >> From log it seems that the pattern is blindly applied to every link rather >> than matching the query_string >> >> applying pattern '^ALP33211$' to uri 'index.php' >> applying pattern '^ALP33211$' to uri >> 'uploads/repository/02/1276_cn74_1001.gif' >> applying pattern '^ALP33211$' to uri >> 'fileadmin/templates/images/btnAddCart.png' > > That cannot be correct, At log level 9, the rewrite log would contain > a mass of information for a single request, where as you are showing > only one line per request. > > Please do not trim the log contents or decide what is important and > what is not, show the entire rewrite log for a single request that > should be rewritten. > > >> …….. >> …. >> >> where te ruleset I have at .htaccess is >> >> RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ >> RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] >> >> The actual url is >> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 >> >> and it has to become >> >> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 >> > > The URL is "/index.php". Everything else is part of the query string. > Your RewriteRule is predicated on the URL "/ALP33211", and so is > ignored. In a .htaccess, you must also not specify the leading '/' > either. > > Please do show the correct log entries, but this should work (untested): > > RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ > RewriteRule index.php index.php?L=5 [QSA,R=301] > > Cheers > > Tom Hello Tom, applied your rules at .htaccess but no luck. The log says as follows 122.176.30.116 - - [24/May/2013:16:02:13 +0200] [www.mydomain.com/sid#7f251146d330][rid#7f251191fa18/initial] (4) [perdir /srv/www/htdocs/mydomain/] RewriteCond: input='id=7&artId=7572&doi=10.5414/ALP33211' pattern='^Id=7572&doi=10.5414/ALP33211$' => not-matched 122.176.30.116 - - [24/May/2013:16:02:14 +0200] [www.mydomain.com/sid#7f251146d330][rid#7f251193cc20/initial/redir#1] (4) [perdir /srv/www/htdocs/mydomain/] RewriteCond: input='' pattern='^Id=7572&doi=10.5414/ALP33211$' => not-matched - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
On Fri, May 24, 2013 at 2:03 PM, Joydeep Bakshi wrote: > It was level 5 and now I have set level 9. > From log it seems that the pattern is blindly applied to every link rather > than matching the query_string > > applying pattern '^ALP33211$' to uri 'index.php' > applying pattern '^ALP33211$' to uri > 'uploads/repository/02/1276_cn74_1001.gif' > applying pattern '^ALP33211$' to uri > 'fileadmin/templates/images/btnAddCart.png' That cannot be correct, At log level 9, the rewrite log would contain a mass of information for a single request, where as you are showing only one line per request. Please do not trim the log contents or decide what is important and what is not, show the entire rewrite log for a single request that should be rewritten. > …….. > …. > > where te ruleset I have at .htaccess is > > RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ > RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] > > The actual url is > http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 > > and it has to become > > http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 > The URL is "/index.php". Everything else is part of the query string. Your RewriteRule is predicated on the URL "/ALP33211", and so is ignored. In a .htaccess, you must also not specify the leading '/' either. Please do show the correct log entries, but this should work (untested): RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ RewriteRule index.php index.php?L=5 [QSA,R=301] Cheers Tom - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
Hi Joydeep, Zitat von Joydeep Bakshi : On 24-May-2013, at 6:23 PM, Jens-Uwe Mozdzen wrote: Hi Joydeep, Zitat von Joydeep Bakshi : On 24-May-2013, at 6:06 PM, "Jens-U. Mozdzen" wrote: Hi Joydeep, Zitat von Joydeep Bakshi : [...] Thanks but without the leading slash it still fails to provide the redirection. Now I have RewriteRule ^ALP33211$ /ALP33211&L=1 [R=301] what's in mod_rewrite's debug log? Regards, Jens Hello Jens, I get repeated sorry, I missed the other response. ` applying pattern '^ALP33211$' to uri `` That's not very helpful yet - increase the log level so you see that a new request is being handled and which rules apply and which don't - "RewriteLogLevel 5" might be a good start. It was level 5 and now I have set level 9. From log it seems that the pattern is blindly applied to every link rather than matching the query_string that's not how I read it: applying pattern '^ALP33211$' to uri 'index.php' applying pattern '^ALP33211$' to uri 'uploads/repository/02/1276_cn74_1001.gif' applying pattern '^ALP33211$' to uri 'fileadmin/templates/images/btnAddCart.png' …….. …. where te ruleset I have at .htaccess is RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] The first rule to check is "does the URI match "^/ALP33211$"? And that's of course applied to all incoming requests, which is what the debug log confirms. The actual url is http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 Then where does your regexp "^/ALP33211$" come from? Shouldn't you rather match "^index.php$"? RewriteCond is just *another* condition the request has to match. And make sure your replacement string is correct - as it is now, you defined to turn "/ALP33211" (which will never match - no leading slash, please) to "/ALP33211&L1"... even if you fix the condition, the replacement looks wrong to me ;) and it has to become http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 hm... might it be you got confused by the format of the query parameters? The final element of the resource is "index.php", everything after the "?" are parameters. Seems that's where your current regexp comes from. Watch your debug log - it tells you what URI is being thrown into the rule sets - the first one from your quote above is "index.php", and it's that URI which needs to be matched in RewriteRule. The &L=5 has to be appended Thanks Regards, Jens - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
On 24-May-2013, at 6:23 PM, Jens-Uwe Mozdzen wrote: > Hi Joydeep, > > Zitat von Joydeep Bakshi : >> On 24-May-2013, at 6:06 PM, "Jens-U. Mozdzen" wrote: >> >>> Hi Joydeep, >>> >>> Zitat von Joydeep Bakshi : [...] Thanks but without the leading slash it still fails to provide the redirection. Now I have RewriteRule ^ALP33211$ /ALP33211&L=1 [R=301] >>> >>> what's in mod_rewrite's debug log? >>> >>> Regards, >>> Jens >>> >>> >> >> Hello Jens, >> >> I get repeated > > sorry, I missed the other response. > >> >> ` >> applying pattern '^ALP33211$' to uri >> >> `` > > That's not very helpful yet - increase the log level so you see that a new > request is being handled and which rules apply and which don't - > "RewriteLogLevel 5" might be a good start. It was level 5 and now I have set level 9. From log it seems that the pattern is blindly applied to every link rather than matching the query_string applying pattern '^ALP33211$' to uri 'index.php' applying pattern '^ALP33211$' to uri 'uploads/repository/02/1276_cn74_1001.gif' applying pattern '^ALP33211$' to uri 'fileadmin/templates/images/btnAddCart.png' …….. …. where te ruleset I have at .htaccess is RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] The actual url is http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 and it has to become http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 The &L=5 has to be appended Thanks
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
Hi Joydeep, Zitat von Joydeep Bakshi : On 24-May-2013, at 6:06 PM, "Jens-U. Mozdzen" wrote: Hi Joydeep, Zitat von Joydeep Bakshi : [...] Thanks but without the leading slash it still fails to provide the redirection. Now I have RewriteRule ^ALP33211$ /ALP33211&L=1 [R=301] what's in mod_rewrite's debug log? Regards, Jens Hello Jens, I get repeated sorry, I missed the other response. ` applying pattern '^ALP33211$' to uri `` That's not very helpful yet - increase the log level so you see that a new request is being handled and which rules apply and which don't - "RewriteLogLevel 5" might be a good start. Regards, Jens -- Jens-U. Mozdzen voice : +49-40-559 51 75 NDE Netzdesign und -entwicklung AG fax : +49-40-559 51 77 Postfach 61 03 15 mobile : +49-179-4 98 21 98 D-22423 Hamburg e-mail : jmozd...@nde.ag Vorsitzende des Aufsichtsrates: Angelika Mozdzen Sitz und Registergericht: Hamburg, HRB 90934 Vorstand: Jens-U. Mozdzen USt-IdNr. DE 814 013 983 - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
On 24-May-2013, at 6:06 PM, "Jens-U. Mozdzen" wrote: > Hi Joydeep, > > Zitat von Joydeep Bakshi : >> [...] >> Thanks but without the leading slash it still fails to provide the >> redirection. >> Now I have >> >> RewriteRule ^ALP33211$ /ALP33211&L=1 [R=301] > > what's in mod_rewrite's debug log? > > Regards, > Jens > > Hello Jens, I get repeated ` applying pattern '^ALP33211$' to uri `` - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
Hi Joydeep, Zitat von Joydeep Bakshi : [...] Thanks but without the leading slash it still fails to provide the redirection. Now I have RewriteRule ^ALP33211$ /ALP33211&L=1 [R=301] what's in mod_rewrite's debug log? Regards, Jens - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
> > Thanks but without the leading slash it still fails to provide the > redirection. > Now I have > > RewriteRule ^ALP33211$ /ALP33211&L=1 [R=301] > Use the RewriteLog, no need to guess what's happening. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
On 24-May-2013, at 5:22 PM, Eric Covener wrote: > On Fri, May 24, 2013 at 7:41 AM, Joydeep Bakshi > wrote: >> Hello list, >> >> Greetings !! >> >> I am using {QUERY_STRING} to append a value to a particular URL. >> >> The actual url is >> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 >> >> and it has to become >> >> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 >> >> The &L=5 has to be appended >> >> Hence I have made the .htaccess rule as >> >> RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ >> RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] > > In .htaccess, a leading slash never matches in a RewriteRule. The > path you compare to is relative to where the htaccess is, without a > leading slash. > Thanks but without the leading slash it still fails to provide the redirection. Now I have RewriteRule ^ALP33211$ /ALP33211&L=1 [R=301] - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
On Fri, May 24, 2013 at 7:41 AM, Joydeep Bakshi wrote: > Hello list, > > Greetings !! > > I am using {QUERY_STRING} to append a value to a particular URL. > > The actual url is > http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 > > and it has to become > > http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 > > The &L=5 has to be appended > > Hence I have made the .htaccess rule as > > RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ > RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] In .htaccess, a leading slash never matches in a RewriteRule. The path you compare to is relative to where the htaccess is, without a leading slash. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] .htaccess {QUERY_STRING} and issue with append a value
Hello list, Greetings !! I am using {QUERY_STRING} to append a value to a particular URL. The actual url is http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211 and it has to become http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5 The &L=5 has to be appended Hence I have made the .htaccess rule as RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$ RewriteRule ^/ALP33211$ /ALP33211&L=1 [R=301] But it is not working at all. Have I done any misconfiguration ? The mod_rewrite is already available and working. Kindly suggest. Thanks - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org