0

Using .htacess rewrite rule, I want to convert this link:

http://localhost/CodeArk/?page=mypage

into

http://localhost/CodeArk/mypage

This is my current code in .htaccess file but it is not working

Options +FollowSymLinks
RewriteEngine On
RewriteRule    ^mypage/?$  http://localhost/CodeArk/?page=mypage    [NC,L] 

And also this is not dynamic, Is there a way to make it work and make it dynamic?

ICG DEVS
  • 195
  • 3
  • 15

1 Answers1

0
Options +FollowSymlinks 
RewriteEngine On
RewriteRule ^/?page=(.*)$ /$1 [R=301,NC,L] //use this

or you can also use

RewriteRule ^/CodeArk/?page=(.*)$ /CodeArk/$1 [R=301,NC,L]
norcal johnny
  • 2,050
  • 2
  • 13
  • 17