Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
direct links do not load unless /forum is visited 1st
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 10, 2012 - 2:18 pm

Well I don't know how to do an .htaccess redirect either. But it makes sense and would allow you to remove a plugin. I will endeavour to find out!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 10, 2012 - 8:17 pm

can you give example of what url you want to redirect? and the url you want to redirect to?

Avatar
bauerm
Member
Free Members
sp_UserOfflineSmall Offline
Jul 11, 2012 - 9:46 am

The original site is http://mywebsite.com/WPsite

I am redirecting that to:

http://mywebsite.com/WPsite/welcome/

The reason why that address looks weird is because the wordpress site is installed into a subfolder of the main website (the subfolder being /WPsite).  But our needs ended up out growing the original design of the theme's "home" page which is why we created a custom page called "welcome" to serve as the new home page.  So /WPsite is the index (but does not have any page associated with it) and /WPsite/welcome/ is simply a wordpress page.  

Avatar
bauerm
Member
Free Members
sp_UserOfflineSmall Offline
Jul 11, 2012 - 12:35 pm

Here is what my current .htaccess looks like

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

# END WordPress

I tried several different methods, but the most common result was getting stuck in an infinite redirect loop, even after disabling and removing the plugin.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 11, 2012 - 2:16 pm

Steve (Mr Papa) will be around later on and he is the one who knows these things!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 11, 2012 - 9:33 pm

that's an interesting question since what you are really trying to do is redirect the main wp page (ie index.php in root) to somewhere else...   I could see why you might get loops and why even the redirection plugin is having problems (probably greedy wp rewrite rules vs .htaccess)...

but if you have not tried:

Redirect 301 http://mywebsite.com/WPsite http://mywebsite.com/WPsite/welcome/

at the very top of the file, give it a shot... of course, make sure the redirection plugin is not active...

that rewrite may be too greedy too, but worth a shot...

Avatar
bauerm
Member
Free Members
sp_UserOfflineSmall Offline
Jul 12, 2012 - 7:13 am

That one looks familiar I think I did try that one.  I tried it again though and it doesn't cause a loop, but it also doesn't redirect the "home" button that the theme forces on.  The only thing I have found that actually accomplished that is the Redirection plugin. hmmmm

The creators of the theme said this when I asked how to hard code the address for the home button

You could do this manually using the 

is_user_logged_in()

 function. You could put this into the index.php file and then put the code you want to appear if the user is logged in inside curly braces. You'll need very good knowledge of PHP to do this, and there's very little I can do to help if you'll be creating your own content.

I don't have very good knowledge of PHP, but this is what I'll research next.  Any pointers would be appreciated!  🙂

Thanks for all your help!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 12, 2012 - 9:46 am

They are probably suggesting you try something like...

if ( is_user_logged_in() ) {
    wp_redirect( 'http://mywebsite.com/WPsite/welcome/' );
}

at the bottom of the index.php file. Not sure of that will work or not to be honest.

andy-signature.png
YELLOW
SWORDFISH
Avatar
bauerm
Member
Free Members
sp_UserOfflineSmall Offline
Aug 13, 2012 - 2:56 pm

Could a conflict with RSS be the culprit?

Our Redirection plugin logs 404 errors and reports 2 at the same time for a link on our landing page that is aimed at a specific forum topic.

Here is how the original link appears as posted [/forum/general-6/enhanced-search-results-from-tuesdays-conference-call/] and here is the rss link that appears at the same time in the error log [/forum/rss/{33CharacterKeyString}/?group=6]  The former is shown in the URL bar when it 404s though.

I noticed the Redirection plugin has an option to provide a RSS Token.  It reads:

A unique token allowing feed readers access to Redirection RSS (leave blank to auto-generate)

Our forum has feedkeys for private RSS feeds enabled.

Our site requires users to login, so do we need said feedkeys set to privatel?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 13, 2012 - 11:07 pm

without feedkeys, your rss feeds will be viewable by all...  if you have private forums, ie require login and permissions, you will want to use feedkeys...

but I dont understand your point...  you reference our group rss feed... and forum topic feed... but they are not the same and dont display the same info...

what is your redirection plugin doing?  really needed? can you tell it to ignore the forum page (most of the good ones I have seen can)?  its probably misinterpreting or not reading the forum url rewrite rules...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17368
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626