notice this for apache based servers.
1.First we need to create a file called
.htaccess in root folder.
2.Let start by enabling mod re-write paste the below code in to the
.htaccess file.
ok great just an fair warning not every host have this enabled so might not work for some.
3.Let say your home page is home.php we going to me it /home/ so the domain will look something like
mysite.com/home/ so let copy the below code to .htaccess
great this create the rule for the virtual folder know your code should look like below
4.Doing great this is the hard part where your calling css & java files or images you will need to do this
or for css
5.ok you get the idea how it works so know you can don the second rule for a new page example below.
6.As you can see above code is for about page so you get how this works know i hope this is easy enough to follow & have a nice day
1.First we need to create a file called
.htaccess in root folder.
2.Let start by enabling mod re-write paste the below code in to the
.htaccess file.
Code:
## Turn On the Rew-Writing Engine
RewriteEngine On
ok great just an fair warning not every host have this enabled so might not work for some.
3.Let say your home page is home.php we going to me it /home/ so the domain will look something like
mysite.com/home/ so let copy the below code to .htaccess
Code:
## Base Dir for home
RewriteRule ^home/$ home.php
great this create the rule for the virtual folder know your code should look like below
Code:
## Turn On the Rew-Writing Engine
RewriteEngine On
## Base Dir for home
RewriteRule ^home/$home.php
4.Doing great this is the hard part where your calling css & java files or images you will need to do this
Code:
imgs/slider/slider.jpg change to ../img/slider/slider.jpg
or for css
Code:
css/bootstrap.css change to ../css/bootstrap.css
5.ok you get the idea how it works so know you can don the second rule for a new page example below.
Code:
## Base Dir for about
RewriteRule ^about/$ about.php
6.As you can see above code is for about page so you get how this works know i hope this is easy enough to follow & have a nice day
Last edited by 3XPOS3D,