SiParker
SiParker

Reputation: 66

htaccess rewrite rule to alternative subfolder / url structure

I need some assistance to rewrite/redirect people with the following urls.

mydomain.com/client/index.php

to

mydomain.com/client-area/?ccce=index

So the name of the php file will be added to the ?ccce=XXXXX part of the other subfolder.

Thanks in advance

Upvotes: 0

Views: 57

Answers (1)

Sumurai8
Sumurai8

Reputation: 20737

Add the following to the .htaccess in your document root:

RewriteEngine on
RewriteRule ^client/([^/]+)\.php$ /client-area/?ccce=$1 [QSA,L]

Upvotes: 1

Related Questions