1
BenG1
Huge NEWB, URL Redirection
  • 2004/9/2 16:07

  • BenG1

  • Just popping in

  • Posts: 16

  • Since: 2004/8/30


Sorry guys for this dumb question.

I have my XOOPS installed in directory. www.domain.com/xoops/html.

My users all of course just type in www.domain.com I was wondering if there is a way to Redirect my user from www.domain.com to www.domain.com/xoops/html. But here is the catch. I want www.domain.com to be displayed in the address bar after the redirect. And now www.domain.com/xoops/html/modules/news. Wondering if anyone can help me with that?

2
SpinMan
Re: Huge NEWB, URL Redirection
  • 2004/9/2 22:02

  • SpinMan

  • Just popping in

  • Posts: 17

  • Since: 2004/4/10


Quote:

BenG1 wrote:
Sorry guys for this dumb question.

I have my XOOPS installed in directory. www.domain.com/xoops/html.

My users all of course just type in www.domain.com I was wondering if there is a way to Redirect my user from www.domain.com to www.domain.com/xoops/html. But here is the catch. I want www.domain.com to be displayed in the address bar after the redirect. And now www.domain.com/xoops/html/modules/news. Wondering if anyone can help me with that?


I don't know if this is the most efficient way to do this (BUT IT WORKS!)

1.) Make a copy of your original index.html and name it index.bak (or something like) incase you want to revert back to original....
2.) Using your html editor (or Windows "notepad") type the following and replace the code <b>'www.domain.com/xoops/html'</b> with your domain info.
3.) Save this as index.html
4.) Move it into the root directory of your site.
5.) BINGO! [caution - it will overwrite your original index.html page]

***************************************************
<html>
<head>
<script>version=parseInt(navigator.appVersion);if (navigator.appVersion.indexOf('5.')>-1){version=5};if (navigator.appVersion.indexOf('6.')>-1){version=6}; if (navigator.appVersion.indexOf('7.')>-1){version=7}; browser='OTHER'; if (navigator.appName=='Netscape'){browser='NS'+version;} if (navigator.appName=='Microsoft Internet Explorer'){browser='MSIE'+version;} if (navigator.appVersion.indexOf('MSIE 3')>0) {browser='MSIE3';} if(browser == 'NS5'){browser='NS6'};if (browser=='MSIE3') {window.location='www.domain.com/xoops/html'}if (browser=='MSIE4') {window.location='www.domain.com/xoops/html'}if (browser=='MSIE5') {window.location='www.domain.com/xoops/html'}if (browser=='MSIE6') {window.location='www.domain.com/xoops/html'}if (browser=='MSIE7') {window.location='www.domain.com/xoops/html'}if (browser=='NS3') {window.location='www.domain.com/xoops/html'}if (browser=='NS4') {window.location='www.domain.com/xoops/html'}if (browser=='NS6') {window.location='www.domain.com/xoops/html'}if (browser=='NS7') {window.location='www.domain.com/xoops/html'}if (browser=='OTHER') {window.location='www.domain.com/xoops/html'}</script></head>
<body>
</body>
</html>
****************************************************

Note: this will not solve having www.domain.com in the address bar...it will look like this:http://www.domain.com/html/modules/news/....

Login

Who's Online

136 user(s) are online (93 user(s) are browsing Support Forums)


Members: 0


Guests: 136


more...

Donat-O-Meter

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

Latest GitHub Commits