I want to test a site on the live server, but without setting the current website offline.
So i changed the index.php from modx to index2.php
But how can i get the site work with index2.php. When I navigate through the site, it still uses index.php.
In .htaccess:
DirectoryIndex index2.php
You’ll also have to change the rewrite rule if using FURLs.
I’m not sure what other side effects there might be but it shouldn’t hurt to try it.
hhmm...it doesn’t seems to work.
in my htacces:
RewriteEngine On
RewriteBase /
DirectoryIndex index2.php
my FURLS are off. But the menu links still don’t change and don’t work when you click on them. It still goes to index.php?id=x
-
☆ A M B ☆
- 24,524 Posts
That’s because when the parser generates links, it generates them as index.php?id=...
How about going the other way?
Use index.html for the original site and let MODx use index.php.
DirectoryIndex index.html
If the original index.html file contains php code, you’ll have to add a handler to make it work.
They shouldn’t interfere with each other that way.
hhmm...still dunno how to fix it. But the website has been launched, so my problem is solved for now :p
Probably your server is configured to load the php file first. If no php file then it loads the html file.
You can configure this from your web server. If not you could try changing the htaccess file. Maybe somebody else can give you more info.
I’m no expert in changing the htaccess file
-
☆ A M B ☆
- 2,213 Posts
This should work:
DirectoryIndex filename.htm
Change the name to the desire index page and add to your htaccess.
AMDbuilder
Well after a bunch of trials and errors, I’ve got something workable for this.
I added the DirectoryIndex index.html to the .htaccess file but got a 500 internal server error. so I recreated and tested the .htaccess file one line at a time and finally included the directoryindex line and now no longer receive the 500 error. Must have been something in the original file that wasn’t right.
So now the default for the site is index.html. So far so good.
Then when I tried to access the modx manager I received a page not found unless I added index.php to the url. Guess that makes sense.
This was really just trial and error so , if anyone see anything wrong with this let me know.
Thanks for your help!
www.terrybarthdesign.com