How to map "" to "" - PHP


When users request the URL like this

then, i want to map that one to

in PHP. Can you please provide me sample code for that ? And let me know where i have to make changes.

Who is Participating?
Dave BaldwinFixer of ProblemsCommented:
As I told you in your other question, PHP can not do this.  It must be done by the web server in order to avoid getting a "404 File Not found" error.
milani_lucieAuthor Commented:
I have this code in htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ /$1 [L,R=301]

But it never works for me. When user hits by using this URL:

It is not picking up the

file. Can you point me in right direction ?

milani_lucieAuthor Commented:

Can you please let me know how to set that (Redirection) in IIS. If you hit a page then we can have code in that page to handle the redirection. But my url is just :

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.

All Courses

From novice to tech pro — start learning today.