Domain redirection prevents forum access

Started by borish, December 31, 2013, 10:11:35 AM

Previous topic - Next topic

borish

Hello,

I've installed SMF 2.0.6 on a domain with an existing WordPress installation. I've chosen mydomain.de/forum as the root for smf. The problem is that mydomain.de redirects to mydomain.de/WordPress_02, which seems to prevent access to  mydomain.de/forum. I get a 404 error if I enter  mydomain.de/forum in the web-browser. The forum works if I deactivate the redirection, but then the start page doesn't work anymore.

Unfortunately, the guy who installed the WordPress is out of reach and I'm not familiar with WP. Maybe I can create a different index.html to use both WP blog and forum?

I am aware of the WP-to-SMF bridge, but this seems to serve a different purpose. Forum members shouldn't be allowed to post in the blog.

Kindred

you will need to change the .htaccess which is currently in your root directory to remove the redirect and then add an index page to the root (index.html or index.php)
Сл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."

borish

I removed the redirect to ./WordPress_02 (not in .htaccess, but with web hoster's config page), uploaded an index.html to / that contains a working redirect to ./WordPress_02, but I keep getting 404 errors. The same is true if I enter mydomain.de/WordPress_02/ in my web browser. I noticed that ./WordPress_02 has permissions 750, but nothing improves if I set it to 755. This is strange. The directory ./WordPress_02 contains another .htaccess that contains


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


The root directory contains a .htaccess that is automatically generated by the web hoster.

Kindred

the problem is with the htaccess in your ROOT directory.
Сл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."

borish

The .htaccess in / just contains

#######################################################################
#     Diese .htaccess wurde vom STRATO-Webservermanager erstellt      #
#######################################################################
Options -Indexes

I assume that there must be another .htaccess because the one above doesn't specify any redirects. Maybe I should ask my web hoster?

The structure of / is

WordPress_01
WordPress_02
cgi-bin
cgi-data
.htaccess
forum
index.html (created by me)

Kindred

yes... I guess you would have to ask your host.

because it should not be redirecting from root to a subdirectory unless there are instructions telling it to do so.
Сл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."

borish

Now I've installed SMF in the directory the domain redirects to. I works, but I had to change some paths. Not sure if this might cause problems with mods.

Kindred

so... instead of figuring out the problem, you just worked within the problem?
Not the best choice...  you should talk to your host and figure out WHY your root domain is redirecting to a subdirectory....  because if you don't know why it's doing that, you won't know why it's doing other things later on.

As for moving the installation - you will need to change ALL of the SMF paths and URLs to match the new location.
Сл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."

borish

The support pointed me to docs that explain how to set up WP. These docs explain that the user should redirect the root to the WP-blog directory and how this is done using the host's web tools. You are right that I still haven't understood how this is done in htaccess and where.

However, I've noticed that SMF uses absolute paths in several places, in particular for SMF, sources, cache, and smileys directories. If I should decide to move the forum directory somewhere else (eg to / or to another server), will it suffice to change just these paths, or are there more? Are these paths saved in the database?

Kindred

There are paths in Settings.php AND the database.

there is a tool to reset your urls and paths
http://wiki.simplemachines.org/smf/Repair_settings.php
Сл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: