News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Problem with link

Started by xvision, April 09, 2014, 10:34:16 PM

Previous topic - Next topic

xvision

Hello SMF users,

I didnt use smf forums for long time and now i tried to install one.
Well i have success installing the forum manuely and installing a new theme.
But another problem cames out, well i made an subdomain on my webhosting.
I installed my website on root www. hxxp:l2flash.com [nonactive] , and i created an subdomain hxxp:forum.l2flash.com [nonactive] , and inside of hxxp:forum.l2flash.com [nonactive] i have installed the smf forum.
Now i am available to see the forum on link www. hxxp:forum.l2flash.com/index.php [nonactive] , but i am not able to see it on www. hxxp:forum.l2flash.com [nonactive] , so with out this index.php ...

Note: I made an space between www. and hxxp:l2flash.com [nonactive] becouse i cannot post an link before i make 10 posts on forum.

What could be the problem and how could i fix it ? Thank you very much.

mashby

Always be a little kinder than necessary.
- James M. Barrie

Herman's Mixen

What is repair_settings.php?

for the Querystring to index.php you should do something to the .htaccess to rewrite rules
so that index.php will rewritten to some URL format ;)
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

xvision

I was thinking about that this problem is connected with .htaccess , but how to make .htaccess to open index.html on main domain and to open index.php on subdomain.
I mean index.html > hxxp:www.l2flash.com [nonactive] and index.php www.forum.l2flash.com  ?

Here is my .htaccess :

AddDefaultCharset utf-8
DirectoryIndex index.html

RewriteEngine on

RewriteRule ^([a-z0-9]*)$ index.html?f=$1 [L]
RewriteRule ^news/([0-9]*)$ index.html?f=news&nid=$1 [L]
RewriteRule ^news/page-([0-9]*)$ index.html?f=news&page=$1 [L]
RewriteRule ^stat/s([0-9]*)$ index.html?f=stat&sid=$1 [L]
RewriteRule ^stat/([a-z]*)/s([0-9]*)$ index.html?f=stat&act=$1&sid=$2 [L]
RewriteRule ^stat/([a-z]*)/s([0-9]*)/clan([0-9]*)$ index.html?f=stat&act=$1&sid=$2&clan=$3 [L]
RewriteRule ^cp/([a-z]*)$ index.html?f=cp&opt=$1 [L]
RewriteRule ^cp/char([0-9]*)/s([0-9]*)$ index.html?f=cp&opt=charinfo&char=$1&sid=$2 [L]
RewriteRule ^cp/support/([0-9]*)$ index.html?f=cp&opt=support&act=write&s=$1 [L]
RewriteRule ^cp/robo/s([0-9]*)$ index.html?f=cp&opt=robo&sid=$1 [L]
RewriteRule ^cp/bill/([A-Z0-9]*)/s([0-9]*)$ index.html?f=cp&opt=robo&act=bill&inv=$1&sid=$2 [L]

Sir Osis of Liver

Not sure what you're trying to accomplish.  www.l2flash.com goes to your website homepage (very nice!), where there's a 'Forum' link in the navbar up top.  If you correct that link to the subdomain, that's how people would get there.  Once in the forum, members can just bookmark the forum link for direct accress.  You can't use the same url to go to two different places.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Herman's Mixen

you need to rewrite some rules and make sure you have in "Forum Settings" --> enabled search friendly urls !!

then you can edit htaccess to your needs to remove index.php


RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.domain.com/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


this can be different for You !!
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

xvision

Quote from: Krash. on April 09, 2014, 11:55:06 PM
Not sure what you're trying to accomplish.  hxxp:www.l2flash.com [nonactive] goes to your website homepage (very nice!), where there's a 'Forum' link in the navbar up top.  If you correct that link to the subdomain, that's how people would get there.  Once in the forum, members can just bookmark the forum link for direct accress.  You can't use the same url to go to two different places.

I know , i will put the link... But i want the forum to be opened with the url www .forum.l2flash.com
I just dont understand why it wont open , it shows only :

QuoteIndex of /

SSI.php
Settings.php
Settings_bak.php
Smileys/
Sources/
Themes/
agreement.txt
avatars/
cgi-bin/
favicon.ico
index.php
license.txt
news_readme.html
readme.html
ssi_examples.php
ssi_examples.shtml
subscriptions.php
u4540227_smf.db

______

Quote from: Herman's Mixen on April 09, 2014, 11:56:31 PM
you need to rewrite some rules and make sure you have in "Forum Settings" --> enabled search friendly urls !!

then you can edit htaccess to your needs to remove index.php


RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.domain.com/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


this can be different for You !!

I tried what u said , search friendly urls is chacked and i added those codes to .htaccess and nothing changed. I am still on the same problem hmm..

Sir Osis of Liver

Would be a lot simpler if you put the forum in a subdirectory rather than a subdomain - www.l2flash.com/forum/.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Just tried it on one of my domains, and it works fine.  Created subdomain that points to a directory containing a test forum, and direct link to subdomain - www.forum.domain.com -  loads the forum normally.  Either you set it up wrong, or your Apache config is different.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

xvision

I have fixed my problem. I have just copy my .htaccess to the forum folder and edited index.html to index.php , and its working fine now.
So i got 1 .htaccess in root for website , and 1 .htaccess in forum folder for subdomain.
I hope there wont be any conflict between those 2 .htaccess files.

Anyway thnak you all.

Kindred

Quote from: Herman's Mixen on April 09, 2014, 11:56:31 PM
you need to rewrite some rules and make sure you have in "Forum Settings" --> enabled search friendly urls !!

UM...   NO (no no no no no)
At this point in the age of the internet, no one should ever be using that silly "enable search friendly urls"   they are useless for SEO and there are numerous KNOWN issues with attempting to use them
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: