This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: 301 redirect directory to index.php
Author
Message |
rodrigocswm
Newbie


Joined: 29 September 2011
Location: Brazil
Posts: 2
Posted: 29 September 2011 at 11:55am

Hello

I had a change of server and need to do a 301 redirect to point to any old link to a new pointing to index.php file and then link to the rest of

example
Old: http://subdominio.exemplo.com/2000/05/20/penne-com-bacalhau-e-brocolis/
Current: http://subdominio.exemplo.com/index.php/2000/05/20/penne-com-bacalhau-e-brocolis/

I using isapi rewrite 3
Back to Top Visit rodrigocswm's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 30 September 2011 at 8:42am

Hello,

Please, try using the following:

Code:
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(\d+/\d+/\d+/(.*))$ /index.php/$1 [NC,L]

NOTE: but I haven't seen any change of the domain in your scenario.

Regards
Andrew

Back to Top
 
rodrigocswm
Newbie


Joined: 29 September 2011
Location: Brazil
Posts: 2
Posted: 30 September 2011 at 11:28am

The domain remains the same, the issue was the inclusion of the index.php file

The error persists even applying the above rule when trying to open the address
"http://subdominio.exemplo.com/2000/05/20/penne-com-bacalhau-e-brocolis/" the server returns me error 404  instead of include index.php at adress.
Back to Top Visit rodrigocswm's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 03 October 2011 at 5:49am

Please, provide the rewrite.log for the testing request. Logging issues described in FAQ
In case you want to perform redirect, please, try adding [R=301]-flag in your rule.

Regards
Andrew
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version