Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2006
    Posts
    107
    Thanks
    1
    Thanked 0 Times in 0 Posts

    regular express problem

    Hi

    I am having problem in fixing the regular expression.
    I want to forward all calls to shop.php but at the same time if[there is call i.e www.example.com then it should took it to index.php not the shop.php

    here is my current expression, it always throw pages to shop.php even if want to go index.php it will take me to shop.pop

    Code:
    RewriteEngine on
    RewriteRule ^/ index.php
    RewriteRule ^([a-zA-Z0-9.]+) shop.php

  • #2
    Regular Coder BWiz's Avatar
    Join Date
    Mar 2006
    Location
    Sol System
    Posts
    471
    Thanks
    7
    Thanked 21 Times in 21 Posts
    Code:
    Options +FollowSymlinks
    RewriteEngine On
    RewriteRule ^([a-zA-Z0-9-]+)/?$ /root/shop.php
    RewriteRule !(css|js|png)$ /root/index.php [L]
    Last edited by BWiz; 07-30-2008 at 04:27 PM.
    BWiz :: Happy Coding!
    2006
    2007 2008 2009
    2010 2011
    Irrational numbers make no sense.

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Code:
    RewriteEngine on
    RewriteRule ^$ index.php [L]
    RewriteRule ^([a-zA-Z0-9.]+) shop.php
    regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •