aneuryzm
aneuryzm

Reputation: 64854

how can I make an URL alias for my web page?

I have installed my website in a subfolder www.server.com/folder/index.php

Is there any way to hide "folder/" in my url ?

The only solution I can think is to change Directory Root on the apache config file, but unluckily I don't have access to it

thanks

Update: all the solutions provided so far are not changing the url

Upvotes: 1

Views: 12979

Answers (4)

poeschlorn
poeschlorn

Reputation: 12440

if you have your website installed on a server you can overlay it with a specific domain...

like www.example.com leads to www.server.com/folder/

In many backends it is an option to do this or even to say that www.server.com/folder/ is root directory

Upvotes: 0

Jeaf Gilbert
Jeaf Gilbert

Reputation: 11991

make .htaccess file, and put this:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.php$ http://www.server.com/folder/$1.php [nc]

everytime you access www.server.com/index.php will be redirected to www.server.com/folder/index.php

Upvotes: 1

Rui Carneiro
Rui Carneiro

Reputation: 5671

Can you create files on root?

Symbolic link

You could create a symbolink link on your root directory:

ln -s /folder/ index.php

Upvotes: 0

Karthik
Karthik

Reputation: 3301

In online, use .htaccess file for change the folder path.

Upvotes: 0

Related Questions