Is it possible to rename index.php or move it to a another folder so that its not on the root directory ?
For example change it to oc-index.php
or move it to a new folder /config/index.php
For example change it to oc-index.php
or move it to a new folder /config/index.php
Last edited by dony_b on Mon Feb 27, 2012 10:39 pm, edited 1 time in total.
Search results for: rename index.php.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
And have you actually read any of the search results and what answer did you find that did not tell you what you probably found out yourself by trying to rename the index.php?dony_b wrote:For your info I always search the forum before I post anything...ive used OC long enough to know that. So thanks for showing me how to use google and not contribute to this support forum.
Did you even tried that, and did you try to move it to another folder?
What was the outcome of your reading and trying?
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Next time you should mention that you have searched, what you have tried and if it failed (or not).
The more info you give, the greater the chance is that you get a to-the-point answer.
As far as I have tried and heard you cannot do what you want to do without a lot of coding (if you even will succeed).
The more info you give, the greater the chance is that you get a to-the-point answer.
As far as I have tried and heard you cannot do what you want to do without a lot of coding (if you even will succeed).
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
I have another application in the root directory that has index.php so im trying to either rename the one one from OC or move to another folder. Do I need to change all occurrences where index.php is being if I was to change or move it.JAY6390 wrote:It's possible to move/rename sure, but to what end do you want to do so?
config shouldn't be an issue. I've just done a grep, and there are actually 97 instances over 37 files on my local copy (15131). The problem is the url class is only used for certain areas, where as it should be done throughout the cart. if you have a good search replace tool like grepwin you could do it in no time. Be careful not to rename the admin index.php instance, there are far more in that folder, and of course you shouldn't need to edit that index file
Try this....
(1.5.x ONLY)
1. rename index.php to ocindex.php
2. Edit .htaccess and add to the top:
3. Global Replace "index.php" with "ocindex.php" in the opencart "catalog" and "system" folders only, filtering on php and tpl files.
You will likely have to do this locally unless you know how to do it with linux SSH.
If you do it locally, change the files and reupload them over your existing files. There are 35 files in the catalog folder and 1 file in the system folder.
(1.5.x ONLY)
1. rename index.php to ocindex.php
2. Edit .htaccess and add to the top:
Code: Select all
DirectoryIndex ocindex.php
You will likely have to do this locally unless you know how to do it with linux SSH.
If you do it locally, change the files and reupload them over your existing files. There are 35 files in the catalog folder and 1 file in the system folder.
that does stand to reason. I never tested it.. just saying to try it. In which case then run the global replace across the WHOLE thing.JAY6390 wrote:It stands to reason that if the url class is rewritten to use ocindex.php, then all of the admin files will need to be rewritten too, as it uses the url class
I wonder if this is going to affect other mods or vqmod files ?Qphoria wrote:Try this....
(1.5.x ONLY)
1. rename index.php to ocindex.php
2. Edit .htaccess and add to the top:3. Global Replace "index.php" with "ocindex.php" in the opencart "catalog" and "system" folders only, filtering on php and tpl files.Code: Select all
DirectoryIndex ocindex.php
You will likely have to do this locally unless you know how to do it with linux SSH.
If you do it locally, change the files and reupload them over your existing files. There are 35 files in the catalog folder and 1 file in the system folder.
I'm wondering why you need 2 applications running in the same folder and also how renaming index.php to ocindex.php will make your other application usable if you need to set default index of the directory to ocindex.php anyway to achieve a functional opencart (because of the high number of urls generated without index.php - or renamed ocindex.php)?
You will still need to hardcode index.php in URL to your other system! Then it's definitelly easier to hardcode othersystemindex.php and leave opencart as is, as OpenCart will be the default for url.com/ (without filename) in any case!
You will still need to hardcode index.php in URL to your other system! Then it's definitelly easier to hardcode othersystemindex.php and leave opencart as is, as OpenCart will be the default for url.com/ (without filename) in any case!
It looks like a quite a few instances to change and might not be worth. Im thinking to create a wildcard subdomain to separate the two apps so I dont have to rename anything.JAY6390 wrote:Yeah. Renaming both index.php files to ocindex.php, then replace all index.php text across all OC files
On a clean 1505 (old yes I know) I get 253 matches over 86 files...so there's quite a few bits to change, but it is possible to do definitely
Lets say I create a subdomain test.domain.com and have the docroot /test/ then redirect it to the primary domain so I keep the same url structure the same.
Add this to .htaccess
Code: Select all
RewriteBase /
RewriteCond %{HTTP_HOST} =test.domain.com
RewriteRule ^.* test/$0 [L]
Who is online
Users browsing this forum: No registered users and 291 guests