htaccess conflit - please help me on this .htaccess, thanks!

Discussion in 'Programming' started by fdoze, Dec 30, 2009.

  1. #1
    Hi,

    Im trying to set up a url like this http://www.domain.com/News/2009/03/06/title-words-and-words-unique-url

    and I want to be ablle to use the same url adding .htm extension, like this

    http://www.domain.com/News/2009/03/06/title-words-and-words-unique-url.htm

    I also want to use clean URLs not just for News... Something like this: http://www.domain.com/OtherContent/MyContent/Content-title-words-and-words-unique-url and http://www.domain.com/OtherContent/MyContent/Content-title-words-and-words-unique-url.htm

    -
    First thing I did was to set up my start page as index-SEOurls.php

    Then I set all .htm to start as non .htm urls

    Then I set rule to general NO AREA urls

    and then I set the NEWS AREA url.

    The problem is if I can only use one or another rule. If I comment one line the other works. If I try to use both I get only the first one to work...

    My code is this:

    
    <Files ~ "^.(htaccess|htpasswd)$">
    deny from all
    </Files>
    DirectoryIndex index-SEOurls.php
    order deny,allow
    
    
    <IfModule mod_rewrite.c>
    
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    
    
    RewriteRule ^(.*)\.htm$ /$1 [NC]
    
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule ^(.*)$	 index-SEOurls.php?mySEOurlAre=NOAREA&mySEOurlFile=$1%{QUERY_STRING} [NC]
    
    #News Rule
    RewriteRule ^news/(.*)$	 index-SEOurls.php?mySEOurlAre=News&mySEOurlFile=$1%{QUERY_STRING} [NC]
    
    </IfModule>
    Code (markup):

    Could you please help me??


    and how can I set my folders or date day, date month, date year, and News and Content title as variables?????


    Thanks in advance!!
     
    fdoze, Dec 30, 2009 IP
  2. fdoze

    fdoze Peon

    Messages:
    205
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    anyone?!?!?!?
     
    fdoze, Dec 31, 2009 IP