Weird Layout?

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

Weird Layout?

Postby walterakkermans » Sun Nov 25, 2007 12:21 am

Hi,

I did everything stated in the notepad file of this mod (read it a third time dcz & Seo :P), and I cant figure out whats wrong here. I copied the htaccess code given by the ACP and pasted it in an .htaccess file in the root of my domain. My phpbb3 forum is in domain.nl/forum, but the redirect seems to work.
I activated the URL rewriting, and now I got this weird layout. Its not a 404 error. (Of course I want my forum to work properly, so the URL rewriting is at the moment set to 'no'.) But here are the two situations:

Link before rewrite:
http://www.photoshop-tutorials.nl/forum ... um.php?f=9
How it looks:
http://www.photoshop-tutorials.nl/goed.gif

Link after rewrite: http://www.photoshop-tutorials.nl/forum ... oernooien/
How it looks:
http://www.photoshop-tutorials.nl/fout.gif

Anyone any idea? Thnx very much.
walterakkermans
 
Posts: 11
Joined: Sat Nov 10, 2007 3:16 pm

Advertisement

Postby dcz » Sun Nov 25, 2007 2:57 pm

Looks like you forgot to either edit the template files or to clear phpBB's cache after you did so.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21411
Joined: Fri Apr 28, 2006 9:03 pm

Postby walterakkermans » Mon Nov 26, 2007 9:41 pm

I cleared the phpbb cache (again, after the normal instructions I did that too I thought... But I tried some things to make it work, I suppose that's the reason), and now the forum is working well :).

There is only one thing I hope you can help me with:
I already got a htaccess file, for my website (joomla cms system). When I pasted the generated htaccess code in the htaccess that already existed, it didnt work, gave a 404 error. So, temporarly I deleted the old htaccess and pasted the code given by the mod. Just tot test it. And that worked. But, I also do need the old htacces, so I have to combine them. But I dont know how, as my knowledge of htaccess isnt that much. I just pasted it below the excisting code. And tried some other things, but without result.
Would you might take a look at that please? And if so, can I pm it to you or...?
walterakkermans
 
Posts: 11
Joined: Sat Nov 10, 2007 3:16 pm

Postby coyote » Mon Nov 26, 2007 9:55 pm

walter,

you could post both your .htaccess files here if you want, so it may help others with the same problem in the future. :)

-C
coyote
phpBB SEO Team
phpBB SEO Team
 
Posts: 284
Joined: Fri May 11, 2007 6:24 am

Postby walterakkermans » Mon Nov 26, 2007 10:07 pm

Hm, there are some things in the htaccess that not everybody has to see/know :P. I will definitly let other people here know what the problem was, and how it was solved. For example if a command was stated/called twice in the same htaccess file and that caused the problem, I will report that here.
I hope you understand.
walterakkermans
 
Posts: 11
Joined: Sat Nov 10, 2007 3:16 pm

Postby coyote » Mon Nov 26, 2007 10:36 pm

Oh sure, that's no problem. You can PM both of us if you want. I'm headed out the door to class, but I'll be back in a few hours. :)
coyote
phpBB SEO Team
phpBB SEO Team
 
Posts: 284
Joined: Fri May 11, 2007 6:24 am

Postby walterakkermans » Mon Nov 26, 2007 11:02 pm

Thnx, I have sent you a pm Coyote.
walterakkermans
 
Posts: 11
Joined: Sat Nov 10, 2007 3:16 pm

Postby coyote » Tue Nov 27, 2007 1:33 am

I see what you mean about some of the information you didn't want posted. I'm going to post parts of your .htaccess that aren't a security risk if you don't mind.

I noticed this area in your original .htaccess file, installed by Joomla:

Code: Select all
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc


I think you need to comment out two of the lines that follow, like this:

Code: Select all
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d


And paste just this part of the generated .htaccess file at the end of your existing one:

Code: Select all
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET As FORUM INDEX
# RewriteRule ^forum/forum\.html$ /forum/index.php [QSA,L,NC]
# FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /forum/viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^forum/announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^forum/[a-z0-9_-]*/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^forum/member([0-9]+)\.html$ /forum/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# THE TEAM
RewriteRule ^forum/the-team\.html$ /forum/memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^forum/[a-z0-9_-]+(-([0-9]+))?\.html$ /forum/viewforum.php?start=$2 [QSA,L,NC]
# END PHPBB PAGES
#####################################################


Try that and let me know if it works. I've been wanting to put Joomla and phpBB on another site I'm working on, and if this works for you, I'll know what to do when I go to install it myself. ;)

Thanks,

-C
coyote
phpBB SEO Team
phpBB SEO Team
 
Posts: 284
Joined: Fri May 11, 2007 6:24 am

Postby SeO » Tue Nov 27, 2007 7:34 am

Maybe we are in a case where putting the .htaccess in the forum/ dir instead would be handier as well.

Have you tried the "alternate location option", after you have submitted with "more options" when generating a .htaccess ?
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby coyote » Tue Nov 27, 2007 4:19 pm

You mean as a subdomain? Or is that necessary?
coyote
phpBB SEO Team
phpBB SEO Team
 
Posts: 284
Joined: Fri May 11, 2007 6:24 am

Postby SeO » Tue Nov 27, 2007 4:51 pm

Nope, you can either use the .htaccess at the domain root level, or in the directory where it's supposed to be active.

The above .htaccess is meant to be installed in the root, together with other rewriterules, it can be handier to install it in the forum/ dir to avoid some confusion with other rewriterules.

It's as well possible to merge the two, but, without the .htaccess code, it's harder to give an hint so.

And the good thing is, the .htaccess generator can handle this case, if you submit once with the more option to yes, more option will show up, and one of them is the alternate location for when phpBB is installed in a sub directory.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby walterakkermans » Tue Nov 27, 2007 8:08 pm

Coyote:
"I think you need to comment out two of the lines that follow, like this". I didnt really understand what you wanted. But I supose you ment that I should delete those lines. So I did. And I pasted that part of the htaccess that you gave me. But, the website worked well, only the forum did not. I got a 404 error.

SeO:
I tried that before, putting the htacces in my forum dir, but then it did not work. Now, after clearing the cache as you can read above, it did work.
So thank you all for the support :)
walterakkermans
 
Posts: 11
Joined: Sat Nov 10, 2007 3:16 pm

Postby walterakkermans » Tue Nov 27, 2007 8:33 pm

oh comment out is putting a # before the line ..hm :P anyway, that seems to have the same effect as deleting it, only when deleting we cant get it back quickly :P
walterakkermans
 
Posts: 11
Joined: Sat Nov 10, 2007 3:16 pm


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 11 guests