Welcome Guest, Not a member yet? Register   Sign In
Old legacy files
#1

[eluser]Vikeoar[/eluser]
I'm building a new site using CI. This new site has to integrate with old html files.

The new CI site is working great. However, I'm building the archive now which is going to do two things:
1) link to the articles created with new CI site
2) link to old html files (also located on same server

architecture looks like...

httpdocs/index.php <- the index.php for CI to route new CI website through
httpdocs/archive/01/index.html <- old legacy page that I need to link to.

My problem....

When I link to http://mysite.com/archive/01/index.html

CI thinks I'm going through the index.php route and returns a 404 error.

I thought in the /httpdocs/ directory I would just be able to use old html files as I normally do. Is this not the case? Am I missing something simple in linking to these old files.

Any help would be greatly appreciated.

Thanks
#2

[eluser]GSV Sleeper Service[/eluser]
are you using the .htaccess example from the docs?
if yes, that .htaccess redirects pretty much everything to index.php
try using one of the other types of rewrite rules, eg
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
this tells your web server to only redirect to index.php if the file or directory does not exist.
#3

[eluser]Vikeoar[/eluser]
Thanks

Yes, I am using the generic .htaccess file that routes everything through index.php.

I will try tinkering with with .htaccess to see if I can get it not route through index.php when calls to /archive directory are made.

Thanks for this. I hadn't thought of changing/customizing the .htaccess file.
#4

[eluser]Vikeoar[/eluser]
Thanks GSV

The .htaccess file did the trick! I put in a condition to exclude /archive directory from routing through CI's index.php page.

Thanks again for pointing me in the right direction.




Theme © iAndrew 2016 - Forum software by © MyBB