LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2012, 02:52 PM   #1
Tenko
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Rep: Reputation: Disabled
Htaccess issue for 2 home pages


Hi everyone,

We've recently installed forum software and wordpress in the same directory and renamed the blog's index.php page to blog.php and at the very top of the htaccess file we have, DirectoryIndex blog.php index.php so wordpress opens first.

All went very well but we're having a tough time getting clean url's for SEO purposes.

We can either have clean url's for the forum's index.php or the permalinks working on wordpress but sadly we cant find a way to have both.

I'm very new to this side but understand that which ever one we delare first out of blog.php or index.php seems to work great but sadly we cant find a way for both to be read, at present the second one just produces a 404.

Sincere apologies for my lack of knowledge and understanding on this issue but would anybody be able to point us in the right direction to how we can have both index pages working.

Many thanks in avance.
 
Old 04-16-2012, 04:08 PM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
I could be wrong but I believe that becuase of how the mod rewrite works on both index.php contains the routing information so by changin index.php to blog.php it is throwing everyting off.

I am not 100% sure but I think you can create a new directory called blog and add an entry in the existing .htaccess to forward any reference to /blog to go to the blog folder which will contain your wordpress site.

Doing a quick search I did find http://stackoverflow.com/questions/8...upal-and-phpbb which may give you some more information.
 
Old 04-16-2012, 04:54 PM   #3
Tenko
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi. Thanks so much for the reply and for the link.

If we moved one into a directory and referenced it from the original htaccess would you know if it would still produce clean url's as if the software were still in the root folder? Would that be possible? So it would remove /forums/ or /blog/ (which ever one was moved) from those url's.

Thanks once again.
 
Old 04-17-2012, 02:28 PM   #4
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Yes it should. Course what would have to happen would be that you need to add the route at the top folder for say /blog/ to reroute to the blog folder. Again I really have not messed with clean urls that much. Most of my php expierence has been for internal applications. No forward facing web sites.
 
1 members found this post helpful.
Old 04-17-2012, 03:05 PM   #5
kb2tfa
Member
 
Registered: Oct 2006
Location: Philadelphia PA
Posts: 161

Rep: Reputation: 16
i wrote this for when i had the same issues
 
1 members found this post helpful.
Old 04-17-2012, 04:36 PM   #6
Tenko
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
That's great. Thank you so much for that. I'll give it a go.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess issue - CentOS JDMs14 Linux - Security 4 09-15-2009 05:20 PM
htaccess issue eldojoseph Linux - Software 1 08-06-2008 06:11 PM
.htaccess mod_rewrite issue Jukas Linux - Software 2 12-13-2005 01:23 PM
.htaccess files doesn't work in home directories rehtorisi Linux - Software 3 08-08-2005 09:02 AM
.htaccess .htpasswd issue Robin01 Linux - Newbie 4 12-24-2003 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration