help with mod_rewrite issue

Discussion in 'Apache' started by ZedPoint, Sep 3, 2009.

  1. #1
    I am trying to change the url http://www.mysite.com/folder/?fmt=rss to http://www.mysite.com/folder/rss.xml

    Here is what I have in my .htaccess file right now
    <IfModule mod_php5.c>
    php_value session.use_only_cookies 1
    php_value session.use_trans_sid 0
    </IfModule>
    
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^mysite.com
    RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    
    RewriteRule .* index.php [QSA,L]
    </IfModule>
    Code (markup):
    I have tried this
    rewriterule ^rss.xml$ ?fmt=rss [L]
    Code (markup):
    rewriterule (.*)\.xml$ ?fmt=$1 [L]
    Code (markup):

     
    ZedPoint, Sep 3, 2009 IP
  2. yuvrajm

    yuvrajm Peon

    Messages:
    52
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteRule ^rss\.xml$  /index.php?fmt=rss
    Code (markup):
    First clean up the clutter from the htaccess file, and I shall not be able to help you much in that, then the above code shall do exactly what you need
     
    yuvrajm, Sep 4, 2009 IP
  3. ZedPoint

    ZedPoint Guest

    Messages:
    297
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Clutter?? what do you mean?
     
    ZedPoint, Sep 5, 2009 IP