CodeIgniter Forums

Full Version: Loading static html pages without modifying hrefs and srcs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all. New to CodeIgniter. Loving it so far. I'm currently using software that generates an index.html page along with css,js,img folders. Is it possible for me to server an entire static page without having to modify the contents of the generated page. The issue is that when the view is served, the javascript, css and images aren't found because of the base_url. Modifying each link in the generated software is not ideal, and will be troublesome when I need to reimport more generated pages. Any idea what can help in this situation?
You would really need to provide an example of how your pages are being created, static links, relative links etc.

However, you can just add a folder called 'pages' to the root, load all your pages into there, and within your CI page views just add normal links to the page you want to link to. You may need to add an exclusion to .htaccess if you are running it, but links just ending in .html is normally enough.

As for missing images and scripts, where are the pages looking for them. A simple solution would be to create whatever folder structure they are looking for and upload the scripts and images.

Hope that helps,

Paul.
Have you tried using base_url() helper function? https://codeigniter.com/user_guide/helpe...l#base_url
@josepostiga - I think he wants to generate pages in another application (perhaps even a windows based one) and use the generated pages in or with CI without modifying them.