lundi 21 septembre 2020

Domain redirection to apache subfolder and removal of extensions from url

I have two questions im struggling with :

  1. I have a static web pages in the following directory of my apache :

var/www/folder/

I have managed to redirect my domain to the above folder to load the html pages, however the when I go to the domain the url shows domain.com/folder Now I understand I need to change the sites-available in the etc/apache2 folder in order to directly hit the domain.com however im trying to achieve it without having to change the etc/apache2 sites-available. Is there a way?

The reason I do not want to change the sites-available is because there is a folder2 inside www which I need to access at some point. How do I redirect the domain without showing the folder on the url?

  1. Inside the www/folder/ I have a few php pages, Now I have tried using .htaccess in the www and inside www/folder/ to remove the .php from the url, however it doesn't seem to work. How do I remove the .php extension from the url?

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire