Mobile app version of vmapp.org
Login or Join
Cody1181609

: Different folder and web structure Is it possible to keep a different folder structure than the web structure that users see when browsing the website? I.e. I want all my main pages to be

@Cody1181609

Posted in: #WebDevelopment

Is it possible to keep a different folder structure than the web structure that users see when browsing the website?

I.e. I want all my main pages to be accessed the following way: example.com/main-page-1/
Do I need to necessarily have each page in a separate folder, or can I keep all them in the same folder and define the structure somewhere else?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cody1181609

2 Comments

Sorted by latest first Latest Oldest Best

 

@Alves908

More dynamically, you can use a single PHP file displaying the content of your static files. You can re-write the urls to whatever you like. By this method, you can avoid general codes (e.g. header, footer, etc) to be repeated in every single file.

10% popularity Vote Up Vote Down


 

@Carla537

Yes, you can do this with URL Rewriting.

The following tutorial explains what URL rewriting is, how to get started with Apache and IIS web servers, as well as a number of useful examples.


URL Rewriting for Beginners

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme