Expression Problem

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Expression Problem

Post by itsmani1 »

Hi

I want / and index.php to go index.php page everything other than that go to shop.php but everything is going to shop.php

Here is expressing i am using.

Code: Select all

RewriteEngine on
RewriteRule ^/ index.php
RewriteRule ^[a-zA-Z]([a-zA-Z.]+) shop.php
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Re: Expression Problem

Post by itsmani1 »

I fixed it:

Solution:

Code: Select all

 
RewriteEngine on
RewriteBase /
RewriteRule ^/?(index\.php)?$ index.php [L]
RewriteRule ^[a-zA-Z]([a-zA-Z.]+) shop.php
Post Reply