redirecrt - add index.php to url

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 19 Nov 2012, 10:57

redirecrt - add index.php to url

19 Nov 2012, 11:02

I would like to redirecrt from:
http://www.myurl.com/?Subject=Content-64
to the url:
http://www.myurl.com/index.php?Subject=Content-64
(with index.php)
any suggestions?

User avatar
Posts: 16
Joined: 19 Nov 2012, 22:21

Re: redirecrt - add index.php to url

19 Nov 2012, 22:59

What is the difference of both except the other has "index.php" with it?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: redirecrt - add index.php to url

20 Nov 2012, 03:29

Hello,

I didn't know if it's a single page redirect or a generic rule, so I created a generic rule for URLs with querystring saying "subject=...."
Please, try using the following:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteCond %{QUERY_STRING} ^Subject=([^/]+)$ [NC]
RewriteRule ^$ /index.php [NC,QSA,R=301,L]


Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 16 guests