11
mboyden
Re: Professionalising the URL addresses
  • 2009/8/7 23:20

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


Glad you got it working, i'll make some changes to my doc based on your feedback. Thanks.

TOON2009 said:Quote:
But there is small trouble. I have tried to change the url adress of the main website it gives me error that the urls cannot be found on this server. Does it has something to do with the .htaccess file which is placed in the headdirectory?? It would be something tha both of the website use the same .htaccess file! How could I get rid of this problem?

Not sure I understand what you mean changing the URL address. Should I assume you mean in the XOOPS mainfile.php? Maybe giving a little more information about exactly what you've done and where and how.

Now, to narrow things down a bit, again.... I assume that both domains point to your server and that both domains are setup to point to the same web directory? Can you put a simple HTML file (like helloworld.html) in that directory and access it from both domain names? What if you move the .htaccess file temporarily to get it out of the picture.

Note, to disable the rewrite portion and make sure that isn't in the way (shouldn't be since it's domain independent), all you have to do is comment out the extra line added in header.php.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

12
T00N2009
Re: Professionalising the URL addresses
  • 2009/8/7 23:53

  • T00N2009

  • Just popping in

  • Posts: 37

  • Since: 2009/5/12


Hello mboyden thanks for ur reply.
I will try to explain what I mean.

I have a both the .com and .org domain names for my website. I use the .org directory as a back up for teh .com version. Whenever i try to bring some changes in teh website first i try them on teh backup version (.org) when these changes are successful then i pass them on to .com version.

I have one hosting account and within the headdirectory of the hosting account i have two XOOPS installations within two different folders ( dotorg and dotcom folders).

I have tried this URL professionalisation on the backup version and as explained in my earlier post it worked. Now i want to implement the URL professionalisation to the .com version which gives me the following error.

Not Found
The requested URL /contact/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at xxxxxxxxxxx.com Port 80

I cant make another .htaccess file because there is already one in the headdirectory of teh hosting for the backup version. Since both teh websites are teh same I modified only the xoRewriteModule.ini.php and header.php files of the dotcom version but it gave me teh error above.


I ( think) the place of .htaccess file is dependent on servers. In some servers you can place it within the website folder in others it should be in the headdirectory.

I hope to have made it clear by what i meant with my last post. I will be looking forward to ur reply.



13
mboyden
Re: Professionalising the URL addresses
  • 2009/8/8 0:10

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


This doesn't appear to be an xoRewriteModule issure, rather more of a mod_rewrite configuration issue.

What I hear your file setup is:

/.htaccess
/dotcom/
/dotorg/

where .htaccess is in the main public_html directory (or whatever your webroot is) and /dotcom is the production directory and /dotorg is the test directory.

Assuming this is correct, are your XOOPS URLs http://www.mydomain.com and http://www.mydomain.org or are they http://www.mydomain.com/dotcom and http://www.mydomain.org/dotorg. I'm going to assume the first and not the last.

Since each XOOPS application is separate and distinct, and the files in /dotcom and /dotorg aren't shared, you will likely want to move the .htaccess file into the /dotorg directory (and you may have to edit it some). The you'll want to create a new .htaccess file in the /dotcom directory. Of course you have to replicate the xoRewriteModule files into the productioin /dotcom install as well as edit the header.php file to match.

Let me know if I didn't understand correctly.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

14
T00N2009
Re: Professionalising the URL addresses
  • 2009/8/8 0:23

  • T00N2009

  • Just popping in

  • Posts: 37

  • Since: 2009/5/12


Hello again

ur assumption is correct.

there is an option in teh hosting account where you could chose which domain name should be teh premair one and which secundaire.

it is like this.

http://www.mydomain.com ( de dotcomversion which is teh premair one)
http://www.mydomain.org/dotorg/ ( the dotorg version) before i had put this .htaccess file in the dotorg folder and it did not work. then we moved is to the headdirectory folder ( /.htaccess )

the dotcom and dotorg XOOPS applications are indeed different and arent shared.

I would like to have one .htaccess file for the .org version and another one for the .com version but since the .htaccess file should b put in teh headdirectory and not in the dotorg or dotcom folders I can only have one .htaccess file in the headdirectory and at teh moment that is the one for the testversion or dotorg version. The oxRewriteModule.ini.php and header.php are modiefied separately.

15
T00N2009
Re: Professionalising the URL addresses
  • 2009/8/8 0:27

  • T00N2009

  • Just popping in

  • Posts: 37

  • Since: 2009/5/12


when i remove teh .htaccess file from teh headdirectory the dotorg version gives me the follwoing error

Not Found
The requested URL /dotorg/aaaaaa/viewcat.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at xxxxxxxxx.org Port 80



the error when i remove the .htaccess file


This is the problem. I am really sorry for my bad english and not being clear enough with the explanaion of the problem.

16
mboyden
Re: Professionalising the URL addresses
  • 2009/8/8 2:27

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


I've never tried running a setup like this although I do have accounts where subdomains are sub-directories of the primary domain webroot. Are you using cPanel or Plesk or similar at your account? I know with cPanel, you can specify the secondary domain to have a root in a sub-directory of the primary -- or in a whole different location off the root of the account home.

As to only having a single .htaccess file, I never heard of being restricted to a single .htaccess file, but I guess it could be possible. I still believe this is an issue with your .htaccess and specifying correct rules for mod_rewrite to make it work for your specific situation.

Apparently this is a fairly common issue/question. A quick search turned up several results including this one which may or may not be what you are looking for but somewhere close.

Apologies about only using English. My spanish is next to nil and my Deutsch is so rusty it's almost worthless, too.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

17
ghia
Re: Professionalising the URL addresses
  • 2009/8/8 7:50

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


If you have these two domains, you may have one .htaccess file for each on condition, if you have two separate directories for it.
Quote:
it is like this.
http://www.mydomain.com ( de dotcomversion which is teh premair one)
http://www.mydomain.org/dotorg/ ( the dotorg version)

If these are realy the url's used to access the sites, then it will not work, because http://www.mydomain.com and http://www.mydomain.org points to the same root directory eg /home/youraccount/www/
Typical the main domain should point to that folder and the second domain http://www.mydomain.org/ should point to /home/youraccount/www/dotorg/

In principle the second XOOPS install will also be reachable from the first domain by using http://www.mydomain.com/dotorg/ , but in this case you run into trouble with the .htaccess files.

BTW: His native is Dutch.

18
Dylian
Re: Professionalising the URL addresses
  • 2009/8/8 9:50

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Hello everybody, i've been working with TOON2009 and i think we have it all working now. I'll try to explain how we did it... (Mostly how it works with his hosting setup ).

His hosting setup is like this:
for domain.org you have to place the file's in the main main directory (let's say the public_html directory)
In this director there's a director for the .com and the .net so its like this:

/public_html/ (domain.org)
/public_html/com (domain.com)
/public_html/net (domain.net)

And i think the problem we had was that the hosting has some sort of rule that a .htaccess file can only be placed in the root folder of a domain so for .org this was the public_html dir and for .com its the .com dir and not the public_html directory.

We placed the .htaccess in the right place and everyting seems to be working now.

Greets Dylian
Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |

Login

Who's Online

237 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 237


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits