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.

.htaccess Issue, Need Help

Discussion in 'Apache' started by falconlink, Oct 14, 2014.

  1. #1
    Hi guys,

    I am having some problem with some .htaccess issue. Looking for help from experts. Let me describe briefly.

    Case 1: I can view this static page tinyprintsongoing.php to domain_name/coupons/tinyprints/ongoing.html very well by the following rewrite code.
    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^coupons/tinyprints/ongoing.html$ tinyprintsongoing.php [NC]
    SEMrush
    Case 2: I have another dynamic page article.php with 3 variables (category, subcategory, id). I want to show the page as domain_name/category/subcategory/id.html. But when I rewrite by the following code, it works, but the above url mismatching.
    RewriteRule ^([^/]+)/([^/]+)/([^/]+).html$ article.php?url=$1&suburl=$2&article=$3 [L]

    What I Want: I want to keep the top url structure as it is now and the 2nd url is to be the same structure as sample. Is it possible? How?
     
    falconlink, Oct 14, 2014 IP
    SEMrush
  2. Keteki

    Keteki Active Member

    Messages:
    112
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #2
    Instead of ([^/]+), you should use ([^/]*)

    Try it!!
     
    Keteki, Oct 18, 2014 IP