user1305245
user1305245

Reputation: 1

htaccess for the url

Hi id like to know how can i write htaccess to make the url below:

http://localhost:8000/foo/index.php?pageid=EmpDataEntry

like this

http://localhost:8000/foo/pageid/EmpDataEntry

thanks

Upvotes: 0

Views: 113

Answers (1)

user1269636
user1269636

Reputation:

Have you read the official mod_rewrite documentation ? Everything is exaplained.

RewriteEngine On
RewriteBase /
RewriteRule ^/foo/pageid/([A-Za-z]+)/?$ /foo/index.php?pageid=$1 [L]

Remove /? if you don't want to allow a trailing slash.

Upvotes: 1

Related Questions