htaccess redirect

I'm having a hard time figuring out a simple redirect.
if someone comes to my site with the url:
https://www.MYSITE.com/Partners

I want to forward them to:
https://www.MYSITE.com/index.php/my_partners
LVL 7
rgranlundAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Have you tried this?
RewriteRule ^(.*) index.php/my_$1

Open in new window


This is not complete because we don't know what all the combinations of your URL's might be - for instance what happens to
https://www.MYSITE.com/Partners/SomethingElse

Open in new window

0
rgranlundAuthor Commented:
Does not matter.  I just want that one re-direct.
0
Julian HansenCommented:
Then try this
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^Partners$ index.php/my_partners [L,NC]

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

rgranlundAuthor Commented:
Is this correct cause it does not seem to work
<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]

	RewriteRule ^Partners$ index.php/spoke_partner [L,NC]
</IfModule>

Open in new window


You can see here:
https://www.spokeinsurance.com/Partners
0
Julian HansenCommented:
It won't  - the first rule will match before the Partners rule and it has a [L] which means don't process any other rules.

Move your last Rewrite before the first like this

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^Partners$ index.php/spoke_partner [L,NC]
        RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

Open in new window

0
rgranlundAuthor Commented:
Still no luck./  It is a windows IIS server if that matters.
0
Dave BaldwinFixer of ProblemsCommented:
It does matter.  I believe the code above is for Apache, not IIS.  Here is the page for IIS Url-rewrite http://www.iis.net/downloads/microsoft/url-rewrite .  There is a list of articles on the right side of that page.
0
Julian HansenCommented:
Put the following into a file called httpd.ini and place that in your root folder

RewriteEngine On
RewriteBase /

# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^Partners$ index.php/spoke_partner [L,NC]
RewriteRule ^(.*)$ /index.php/$1 [L]

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Julian HansenCommented:
But I am confused, you have another rule there

RewriteRule ^(.*)$ /index.php/$1 [L]

Open in new window


Which I assume is working or else your site would not be working - so can you clarify?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.