-3

I have created index.php file and give header i.e

<?php

header('location:/cicareer/members');

?>

url is:

careermate.in/cicareer/members

I want to remove

/cicareer/members

So, how could I do this using .htaccess file ?

Sailendra
  • 1,318
  • 14
  • 29
sam orten
  • 206
  • 3
  • 16
  • You can use explode command --> $url = "careermate.in/cicareer/members"; $pieces = explode("/", $url); echo $pieces[0]; --> that should echo careermate.in – Tasos Oct 24 '16 at 07:26
  • http://stackoverflow.com/questions/276516/parsing-domain-from-url-in-php – Farkie Oct 24 '16 at 07:28

1 Answers1

0

This line may help in your .htaccess file

RewriteRule ^index.php$ /cicareer/members/index.php

In order to use this you need to have mod_rewrite module enabled in your httpd.conf

LegenJerry
  • 420
  • 3
  • 7