phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
.htaccess error

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
::  
Author Message
megh789



Joined: 22 Aug 2008
Posts: 22

.htaccess errorPosted: Sun Aug 24, 2008 7:26 am    Post subject: .htaccess error

I install the mod again and trying to find the template error.but now i getting another problem.firstly i install in on my pc(local server) then i reupload the file and install it.

here's the .htaccess:


Code:
    # 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>

    # You may need to un-comment the following line
    # Options +FollowSymlinks
    # REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
    RewriteEngine On
    # REWRITE BASE
    RewriteBase /
    # HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

    #####################################################
    # PHPBB SEO REWRITE RULES - ADVANCED
    #####################################################
    # AUTHOR : dcz www.phpbb-seo.com
    # STARTED : 01/2006
    #################################
    # FORUMS PAGES
    ###############
    # FORUM INDEX
    RewriteRule ^forum\.html$ /phpBB3/index.php [QSA,L,NC]
    # FORUM
    RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /phpBB3/viewforum.php?f=$1&start=$3 [QSA,L,NC]
    # TOPIC WITH VIRTUAL FOLDER
    RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /phpBB3/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
    # GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
    RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /phpBB3/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
    # TOPIC WITHOUT FORUM ID & DELIM
    RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /phpBB3/viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
    # PROFILES THROUGH USERNAME
    RewriteRule ^member/([^/]+)/?$ /phpBB3/memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
    # USER MESSAGES THROUGH USERNAME
    RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /phpBB3/search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
    # GROUPS ADVANCED
    RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /phpBB3/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
    # POST
    RewriteRule ^post([0-9]+)\.html$ /phpBB3/viewtopic.php?p=$1 [QSA,L,NC]
    # ACTIVE TOPICS
    RewriteRule ^active-topics(-([0-9]+))?\.html$ /phpBB3/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
    # UNANSWERED TOPICS
    RewriteRule ^unanswered(-([0-9]+))?\.html$ /phpBB3/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
    # NEW POSTS
    RewriteRule ^newposts(-([0-9]+))?\.html$ /phpBB3/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
    # THE TEAM
    RewriteRule ^the-team\.html$ /phpBB3/memberlist.php?mode=leaders [QSA,L,NC]
    # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

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



But my forum path is /forum

not phpbb3. i try to edit the phpbb3 to forum. but there is another problem. it show localhost/phpbb3


I clear the cache. but still i getting this problem.



Edit:
After that i delete full forum and remoding everything. but still i got this error Crying or Very sad
Back to top
swiety



Joined: 11 Mar 2008
Posts: 9

.htaccess errorPosted: Sun Aug 24, 2008 7:50 pm    Post subject: Re: .htaccess error

Your post is a bit messy, but I'll try to help you.

What server app are you using as localhost? XAMPP? Do you enabled mod rewrite in httpd.conf file?
If not, go to xampp\apache\conf\ directory and edit httpd.conf file. All you need to do is uncomment the line (delete # at the begining):
Code:
#LoadModule rewrite_module modules/mod_rewrite.so

and then find:
Code:
AllowOverride None

and change it to:
Code:
AllowOverride All

It appers three times in that file.
Now you have mod rewrite enabled on you localhost.

If you have your forum installed in the root direcotry of localhost e.g.:
Code:
C:\xampp\htdocs\

you need to use the .htaccess file dedicated for root install, e.g.:
Code:
# TOPIC
RewriteRule ^[a-z0-9_-]*-t([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L,NC]

but if you have your forum installation in a folder e.g:
Code:
C:\xampp\htdocs\forum\

you need to use the .htaccess file dedicated for folder install, e.g.:
Code:
# TOPIC
RewriteRule ^phpbb/[a-z0-9_-]*-t([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L,NC]

and if you have localhost/forum change the patch in htaccess, every "phpbb" need to be replaced by "forum". That's all Wink .

Your .htaccess is completely messed up Exclamation
You have two different patches in one line...ehhh
Code:
RewriteRule ^forum\.html$ /phpBB3/index.php [QSA,L,NC]

This should looks like:
Code:
RewriteRule ^forum\.html$ /forum/index.php [QSA,L,NC]


and more proper lines for localhost/forum patch:

Code:
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
RewriteRule ^forum/index\.html$ /forum/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^forum/[a-z0-9_-]*/([^/]+\.html)$ /forum/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^forum/[a-z0-9_-]*-c([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /forum/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)\.html$ /forum/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^forum/[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ /forum/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^forum/[a-z0-9_-]*-t([0-9]+)\.html$ /forum/viewtopic.php?t=$1 [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/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END forum PAGES
#####################################################


You always put the .htaccess file in the root directory of your localhost which is:
Code:
C:\xampp\htdocs\

when RewriteBase /


Cheers Laughing
Back to top
megh789



Joined: 22 Aug 2008
Posts: 22

.htaccess errorPosted: Sun Aug 24, 2008 11:55 pm    Post subject: Re: .htaccess error

sorry i messed up to explain. firstly i install that in my local server( from my pc). then i uploaded those edited file to my ftp i mean the real server, then i got this error.

when i click to board index it goes to:

-http://localhost/phpBB3

but the real path is:

-http://my site url.com/forum

after i getting this error i install the mod again( not my local server ) and upload it to my server. but still i getting this problrm Confused
Back to top
swiety



Joined: 11 Mar 2008
Posts: 9

.htaccess errorPosted: Tue Aug 26, 2008 7:47 am    Post subject: Re: .htaccess error

OK, no prob.
So...proper .htaccess file for patch yoursite.com/forum/ need to looks like this:
Code:
# You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteBase /

#########################################################
# PHPBB SEO REWRITE RULES            #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^forum/index\.html$ /forum/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^forum/[a-z0-9_-]*/([^/]+\.html)$ /forum/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^forum/[a-z0-9_-]*-c([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /forum/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)\.html$ /forum/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^forum/[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ /forum/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^forum/[a-z0-9_-]*-t([0-9]+)\.html$ /forum/viewtopic.php?t=$1 [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/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################


You need to put it is your root direcotry, e.g. if you're using PLESK based server your home (root) directory would be:
Code:
/httpdocs/

Simply, root dir is when the url is "/".

Those rules should make your mod rewrited works well Wink .
Back to top
megh789



Joined: 22 Aug 2008
Posts: 22

.htaccess errorPosted: Tue Aug 26, 2008 4:35 pm    Post subject: Re: .htaccess error

same problem.

it give the forum link path:
-http://localhost/

Confused

i download the pre modded phpbb seo and upload to my server. after that i just replace the config file. but still the same problem. is there are any sql problem?
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

.htaccess errorPosted: Thu Aug 28, 2008 7:13 am    Post subject: Re: .htaccess error

So this .htaccess suggest that you have activated the virtual root option.

Then, for the phpBB3 path, just update your phpBB config to match your installation, for now it's using "phpBB3/" as script path and it should be forum/ in your case.

Make sure that your server settings in acp are correct, and generate a new .htaccess, it will work Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
megh789



Joined: 22 Aug 2008
Posts: 22

.htaccess errorPosted: Thu Aug 28, 2008 9:20 am    Post subject: Re: .htaccess error

I am dump. there are some problem about site url path which i don't change after replace new files. now working fine. Very Happy
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: