HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Installed ocportal in subdirectory.....

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#94838 (In Topic #18892)
Avatar

Well-settled

Installed ocportal in dir of public_html

Hi,
I installed ocportal in the following dir structure. www.mydomain.com/public_html/ocportal/index.php

works fine but I wanted to have a uesr hit mydomain.com/index and be redirected or what ever to the ocportal directory index.php.  My host tech. support was not able to help me with this. so I copied the ocportal dir and all its content to mydomain/public_html and it work when user goes to my domain.

***probelm is I want the index.php in public_html and all other files located in ocportal subdirectory.

what files do I need in public_html and what edits do I have to do to make this work?

thx.~larryg1957
Back to the top
 
Posted
Rating:
#94848
Avatar

Community saint

I am not sure you can have the index file in root and the rest of the files in a subdirectory but i could be wrong. However you can have the index and all the files in the subdirectory and use htaccess rewrite rules to point to it so it will look like yourdomain.com/index. You will also likely have to change the base_path in ocportal to reflect this too I believe.

However your host should be able to put a virtual host configuration file on the server for you that makes this even easier.
Back to the top
 
Posted
Rating:
#94849
Avatar

Community saint

All you should need is a redirect in the .htaccess file. Something like this:

Code

RewriteRule ^index$ www.mydomain.com/public_html/ocportal/index.php [R=301]
You don't need to add any files to you root.


Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#94856
Avatar

Well-settled

Ok so I have a plain.htaccess and recommend.htaccess both in public_html I bellieve as a result from copying the whole ocportal dir to my root. I dont have a .htacess file that I can find. are these files the same to edite with the rewrite rule?

Should I copy all the files back to ocportal dir and edit those two files and leave them in the ocportal dir?

Again I cant find .htacess and Do I need any files at all (index.php, .htacess) in root?

Thx.
For your help
~larryg1957
Back to the top
 
Posted
Rating:
#94865
Avatar

Community saint

If you installed ocportal to the /ocportal directory, then that is the only place that needs to contain any ocportal files. So any files you subsequently copied from /ocportal/ to the root should be deleted from the root.

You should have .htaccess files. If you can't see them then you probable need to enable the "View Dot files" (or equivalent) option in your FTP program, or if you are using cpanel then you need to check "Show Hidden Files (dotfiles)" in the File Manager popup.

I just tested the redirect on one of my domains, so based on the info you've provided, the following should work for your .htaccess file (once you find it that is, which I expect should be in /mydomain.com/public_html/).

Code

RewriteRule ^index$ http://mydomain.com/public_html/ocportal/index.php [R=301]

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#94867
Avatar

Community saint

larryg1957 said

Ok so I have a plain.htaccess and recommend.htaccess … I dont have a .htacess file that I can find

temp1024 said

You should have .htaccess files.
I think you've missed a trick here, larry.

The advice when installing ocPortal is to upload EITHER 'plain' or 'recommended' .htaccess to your server and then rename it, thereby creating a 'tailor-made' .htaccess specifically for your ocPortal installation.

You will also find several (many) .htaccess files in various other root folders of your installation.

Does that help?

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#94868
Avatar

Community saint

The act of installing ocPortal will automatically create a .htaccess file. So even if he doesn't rename the plain.htaccess or recommend.htaccess there should still be one there.

As ocPortall was installed to a subdirectory the .htaccess at issue will be the one for the domain (which should have automatically been created when the domain was added) and not the one for the ocPortall install. If ocPortal was installed to the root of the domain then the .htaccess for the domain and the ocPortal install would be the same.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#94887
Avatar

Well-settled

Flecth and Temp1024…

Well here is where it is at.  My host finally provided an index.php file with a redirect statement that works!  So now correctly when my clients type my url they get redirected to public_html/ocportal/index.php and everything is peachy….

….but wait after I delete all the directories in public_html that I copied from public_html/ocportal it still works but when you hit my page it looks like it is just html,  no formating, themes, just header text stuff alaign left.

I have tried rename plain.htaccess to .htaccess in public_html –>> no change.

I have used .htaccess (rewrite statement) in public_html   –>> no change.

My index.php redirect is working in public_html and I get to public_html/ocportal just fine.

The only way I seem to be able to redirect to the directory /ocportal and have my site pick-up what I will call environmental varitables(sp) and my theme is if I copy /ocportal back to /public_html and then the redirect happens and my theme and site comes up.

I think this is really close to what I want just not quite there yet.  
Thanks for your help  Any Ideas?
Back to the top
 
Posted
Rating:
#94893
Avatar

Community saint

After deleting the ocportal files from the root, have you tried flushing both the ocPortal caches and your browser caches?

Also, check /mydomain.com/public_html/ocportal/info.php and make sure that base_url is pointing the ocportal subdirectory. It should be:

Code

$SITE_INFO['base_url']='http://mydomain.com/public_html/ocportal';

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#94894
Avatar

Well-settled

temp1024 hi,
I know how to dump cash in browers but I have only seen ocportal cash in update(maintenance mode) option.  
Is there a better place to empty ocportal's cash?

Obviously, new to this.

but it looks to me with ocportals files deleted from public_html that only the html is loaded and css php don't.

Anyhow's I will try your suggestions and empty cashes and check base url.

Thx.
Again your your help!

~larryg1957
Back to the top
 
Posted
Rating:
#94895
Avatar

Well-settled

sorry cache and upgrader
Back to the top
 
Posted
Rating:
#94921

Non-joined user

Well here the deal. After some frustration and trying all kinds of things  I ultimately got this working….

I used .htaccess with rewrite rule, index.php with redirect to my new installed directory.

Don't know why  but this is working, I know why it works but I don't know why my other installation wouldnt work even with the same geographical installation scenerio eg, ocportal installed in a subdirector under public_html/ocportal with the rewrite and redirect.  Still wouldnt work unless all files were copied from ocportal to public_html. Must have screwed up some environmental vars in the copy maybe changed permissions some how with the copy.

anyways thx. everyone for your help and getting running again!!!

special thx. to @Fletch @temp1024

~larryg1957
Back to the top
 
Posted
Rating:
#94922
Avatar

Community saint

larryg1957 said

  • Well here the deal. After some frustration and trying all kinds of things  I ultimately got this working….
  • special thx. to @Fletch @temp1024
Congrats on getting it working. I'll also get the theme ready ASAP so that you can have a 'spiffing' new site display …!!

No thanks to me as it was temp driving the 'redirect' and '.htaccess' issues. If you hadn't already gathered, it pays dividends to take his advice - as many have done in the past!

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#94923

Non-joined user




Fletch said

larryg1957 said

 
  • special thx. to @Fletch @temp1024

Congrats on getting it working. I'll also get the theme ready ASAP so that you can have a 'spiffing' new site display …!!

No thanks to me as it was temp driving the 'redirect' and '.htaccess' issues. If you hadn't already gathered, it pays dividends to take his advice - as many have done in the past!

 :thumbs:


Well I am in dazzelled by the knowledge and willingness to help support others with the ocPortal CMS!!!

I installed another CMS and found there was little to no help and all the modules seem to be not quiet as cohesive …
So then I was searching forums and found the support here the most active and constant.

So that why I am using it.

Thx. Again for all everyones help.
anoxiuosly awaiting spiffy, splashy .tpl……
~larryg1957
Back to the top
 
Posted
Rating:
#94928
Avatar

Community saint

Its great that you got it working larryg1957 :thumbs:, although I don't understand why you needed a fix in both the .htaccess and index.php as they are both redirects O_o .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: