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 redirection problem

Discussion in 'PHP' started by dineshsingh1984, Aug 29, 2014.

  1. #1
    I want to redirect two pages
    1>cat.php
    2>shay.php
    and i'm using this code which perfect working :

    RewriteRule ^category/([a-zA-Z0-9_-]+)$ cat.php?username=$1&page=$2
    RewriteRule ^category/([a-zA-Z0-9_-]+)/$ cat.php?username=$1&page=$2
    RewriteRule ^shayari/([a-zA-Z0-9_-]+)$ shay.php?usernames=$1&pages=$2
    RewriteRule ^shayari/([a-zA-Z0-9_-]+)/$ shay.php?usernames=$1&pages=$2
    but i want to use green text dynamic like this ([a-zA-Z0-9_-]+) and i'm using this code like this:

    RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ cat.php?username=$1&page=$2
    RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/$ cat.php?username=$1&page=$2
    RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ shay.php?usernames=$1&pages=$2
    RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/$ shay.php?usernames=$1&pages=$2
    here cat.php page open correctally but shay.php open as blank. no content show on this page. I think page redirected on cat.php, so please give me a solutions.

    plz help me................
     
    dineshsingh1984, Aug 29, 2014 IP