1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Data Life Engine CMS Rewrite module help needed

Discussion in 'Content Management' started by wrigley26, Oct 24, 2009.

  1. #1
    I want link to be rewritten as http://mysite/files/games/hoopy.zip instead of http://mysite/download.php?section=games&file=hoopy.So there is a module in Data life engine CMS that does this but the problem is that when i click on say http://mysite/files/games/hoopy.zip, it doesn't display the whole post instead shows a page similar to the index page....plz help me with this...Below is the .htaccess code..plz edit n send it back..it would be helpful


    DirectoryIndex index.php
    
    RewriteEngine On
    
    # Ðåäèðåêòû
    RewriteRule ^page/(.*)$ index.php?cstart=$1 [L]
    
    # Ñàì ïîñò
    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6 [L]
    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 [L]
    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$ engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 [L]
    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4 [L]
    
    RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$4&news_page=$2&cstart=$3 [L]
    RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$3&news_page=$2 [L]
    RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$ engine/print.php?news_page=$2&newsid=$3 [L]
    RewriteRule ^([^.]+)/([0-9]+)-(.*).html(/?)+$ index.php?newsid=$2 [L]
    
    RewriteRule ^page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$3&news_page=$1&cstart=$2 [L]
    RewriteRule ^page,([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$2&news_page=$1 [L]
    RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$ engine/print.php?news_page=$1&newsid=$2 [L]
    RewriteRule ^([0-9]+)-(.*).html(/?)+$ index.php?newsid=$1 [L]
    
    # Çà äåíü
    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2&day=$3 [L]
    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&day=$3&cstart=$4 [L]
    # Çà âåñü ìåñÿö
    RewriteRule ^([0-9]{4})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2 [L]
    RewriteRule ^([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&cstart=$3 [L]
    # Âûâîä çà âåñü ãîä
    RewriteRule ^([0-9]{4})(/?)+$ index.php?year=$1 [L]
    RewriteRule ^([0-9]{4})/page/([0-9]+)(/?)+$ index.php?year=$1&cstart=$2 [L]
    # âûâîä îòäåëüíîìó òåãó
    RewriteRule ^tags/([^/]*)(/?)+$ index.php?do=tags&tag=$1 [L]
    RewriteRule ^tags/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=tags&tag=$1&cstart=$2 [L]
    # âûâîä äëÿ îòäåëüíîãî þçåðà
    RewriteRule ^user/([^/]*)/rss.xml$ engine/rss.php?subaction=allnews&user=$1 [L]
    RewriteRule ^user/([^/]*)(/?)+$ index.php?subaction=userinfo&user=$1 [L]
    RewriteRule ^user/([^/]*)/page/([0-9]+)(/?)+$ index.php?subaction=userinfo&user=$1&cstart=$2 [L]
    RewriteRule ^user/([^/]*)/news(/?)+$ index.php?subaction=allnews&user=$1 [L]
    RewriteRule ^user/([^/]*)/news/page/([0-9]+)(/?)+$ index.php?subaction=allnews&user=$1&cstart=$2 [L]
    RewriteRule ^user/([^/]*)/news/rss.xml(/?)+$ engine/rss.php?subaction=allnews&user=$1 [L]
    # âûâîä âñåõ ïîñëåäíèõ íîâîñòåé
    RewriteRule ^lastnews/(/?)+$ index.php?do=lastnews [L]
    RewriteRule ^lastnews/page/([0-9]+)(/?)+$ index.php?do=lastnews&cstart=$1 [L]
    # âûâîä â âèäå êàòàëîãà
    RewriteRule ^catalog/([^/]*)(/?)+$ index.php?catalog=$1 [L]
    RewriteRule ^catalog/([^/]*)/page/([0-9]+)(/?)+$ index.php?catalog=$1&cstart=$2 [L]
    # âûâîä íåïðî÷èòàííûõ ñòàòåé
    RewriteRule ^newposts(/?)+$ index.php?subaction=newposts [L]
    RewriteRule ^newposts/page/([0-9]+)(/?)+$ index.php?subaction=newposts&cstart=$1 [L]
    # Ñòàòèñòè÷åñêèå ñòðàíèöû
    RewriteRule ^static/(.*).html(/?)+$ index.php?do=static&page=$1 [L]
    # âûâîä èçáðàííûõ ñòàòåé
    RewriteRule ^favorites(/?)+$ index.php?do=favorites [L]
    RewriteRule ^favorites/page/([0-9]+)(/?)+$ index.php?do=favorites&cstart=$1 [L]
    
    RewriteRule ^rules.html$ index.php?do=rules [L]
    RewriteRule ^statistics.html$ index.php?do=stats [L]
    RewriteRule ^addnews.html$ index.php?do=addnews [L]
    RewriteRule ^rss.xml$ engine/rss.php [L]
    RewriteRule ^sitemap.xml$ uploads/sitemap.xml [L]
    
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^.]+)/page/([0-9]+)(/?)+$ index.php?do=cat&category=$1&cstart=$2 [L]
    RewriteRule ^([^.]+)/?$ index.php?do=cat&category=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^<]+)/rss.xml$ engine/rss.php?do=cat&category=$1 [L]
    RewriteRule ^page,([0-9]+),([^/]+).html$ index.php?do=static&page=$2&news_page=$1 [L]
    RewriteRule ^print:([^/]+).html$ engine/print.php?do=static&page=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+).html$ index.php?do=static&page=$1 [L]
    Code (markup):

     
    wrigley26, Oct 24, 2009 IP
  2. Mohammed88

    Mohammed88 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't know what you are trying to do, because if you are trying to download an already uploaded file so I don't think you should have a problem

    Are you trying to create a new extension in Datalife but .htaccess won't let you? if this is your case then it's an easy one
     
    Mohammed88, Oct 26, 2009 IP
  3. AlcVitRes

    AlcVitRes Well-Known Member

    Messages:
    124
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #3
    RewriteEngine On
    RewriteRule ^files/([^/]*)/([^/]*)\.zip$ /download.php?section=$1&file=$2 [L]

    PM me for more info, I'll give u further specs.
     
    AlcVitRes, Oct 27, 2009 IP