I have the next rules, and I should be able to access to this URLs without any problem:

domain.com/robots.txt - should redirect me to -> domain.com/sitemapHT/robots.txt now robots.txt has an index of xmls files, where does the sitemaps for different sections of the site write its sitemap. For example: domain.com/sitemapHT/sitemap_anuciantes.xml

With the current rules (below) When I try to access to any of the /robots.txt or sitemapHT urls, it sends me to domain.com/

The rules also are redirecting from old /portal/index.action url we have, to a new just /

Could you help me to fix the rules to access properly to the previous urls?

RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
Options +FollowSymlinks


## Rompiendo las reglas

RewriteCond $1 !^/(sitemapHT/|portal/)
RewriteRule ^/robots.txt /sitemapHT/robots.txt [R=301]

#RewriteRule ^/$ /portal/index.action [PT]
#RewriteRule ^/portal/index.action / [R]
#RewriteRule ^/(?!portal)(.*) /portal/ficha.action/$1 [PT]

RewriteLog:

10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (2) init rewrite engine with requested uri /robots.txt 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '.*' to uri '/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '^/robots.txt' to uri '/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (2) rewrite '/robots.txt' -> '/sitemapHT/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (2) explicitly forcing redirect with http://hoteles.t1.yellargentina.com/sitemapHT/robots.txt 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (1) escaping http://hoteles.t1.yellargentina.com/sitemapHT/robots.txt for redirect 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (1) redirect to http://hoteles.t1.yellargentina.com/sitemapHT/robots.txt [REDIRECT/302] 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (2) init rewrite engine with requested uri /sitemapHT/robots.txt 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '.*' to uri '/sitemapHT/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '^/robots.txt' to uri '/sitemapHT/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '^/$' to uri '/sitemapHT/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '^/portal/index.action' to uri '/sitemapHT/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '^/(?!portal)(.*)' to uri '/sitemapHT/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (2) rewrite '/sitemapHT/robots.txt' -> '/portal/ficha.action/sitemapHT/robots.txt' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (2) forcing '/portal/ficha.action/sitemapHT/robots.txt' to get passed through to next API URI-to-filename handler 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (2) init rewrite engine with requested uri / 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '.*' to uri '/' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '^/robots.txt' to uri '/' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (3) applying pattern '^/$' to uri '/' 10.248.22.23 - - [28/Jul/2011:12:19:20 --0300] [hoteles.t1.yellargentina.com/sid#2b2920b16818][rid#2b2920bc5d68/initial] (2) rewrite '/' -> '/portal/index.action'

Thank you!

link|improve this question

50% accept rate
What do you see if you enable logging of rewrite actions using RewriteLog and RewriteLogLevel? – larsks Jul 27 '11 at 20:43
Please include all the rewrite rules if you want help. – h0tw1r3 Jul 28 '11 at 6:20
This are all my rewrite rules. The last 3 are commented since they are not letting me to get into /robots.txt or /sitemapHT/robots.txt or /sitemapHT/anunciantes.xml for example. – BoDiE2003 Jul 28 '11 at 14:53
Ive placed my RewriteLog into the main question. – BoDiE2003 Jul 28 '11 at 15:56
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.