htacces help at GYm

The GYM Sitemaps & RSS module for phpBB. Sitemaps and RSS feeds for Google Yahoo! and MSN Live, support, add ons etc ...

Moderator: Moderators


htacces help at GYm

Postby Professional » Sat Aug 23, 2008 5:00 am

hi installed the advanced rewrite success fuly with this htaccess code:
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>

    # 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 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]+)/?(page([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?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
    # PROFILES ADVANCED
    RewriteRule ^forum/[a-z0-9_-]*-u([0-9]+)\.html$ /forum/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
    # USER MESSAGES ADVANCED
    RewriteRule ^forum/[a-z0-9_-]*-u([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /forum/search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
    # GROUPS ADVANCED
    RewriteRule ^forum/[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /forum/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
    # POST
    RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
    # ACTIVE TOPICS
    RewriteRule ^forum/active-topics(-([0-9]+))?\.html$ /forum/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
    # UNANSWERED TOPICS
    RewriteRule ^forum/unanswered(-([0-9]+))?\.html$ /forum/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
    # NEW POSTS
    RewriteRule ^forum/newposts(-([0-9]+))?\.html$ /forum/search.php?search_id=newposts&start=$2&sr=topics [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 THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^forum/([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /forum/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
    # END PHPBB PAGES
    #####################################################



AddHandler application/x-httpd-php5 php

deny from 85.198.1.9
deny from 217.219.53.254

RewriteCond %{HTTP_HOST} ^mobile4persian.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mobile4persian.com$
RewriteRule ^/?$ "http\:\/\/www\.mobile4persian\.com\/forum\/" [R=301,L]



then i installed GYm site map B3,and gnerate new htaccess and replaced :
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>

    # 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 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]+)/?(page([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?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
    # PROFILES ADVANCED
    RewriteRule ^forum/[a-z0-9_-]*-u([0-9]+)\.html$ /forum/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
    # USER MESSAGES ADVANCED
    RewriteRule ^forum/[a-z0-9_-]*-u([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /forum/search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
    # GROUPS ADVANCED
    RewriteRule ^forum/[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /forum/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
    # POST
    RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
    # ACTIVE TOPICS
    RewriteRule ^forum/active-topics(-([0-9]+))?\.html$ /forum/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
    # UNANSWERED TOPICS
    RewriteRule ^forum/unanswered(-([0-9]+))?\.html$ /forum/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
    # NEW POSTS
    RewriteRule ^forum/newposts(-([0-9]+))?\.html$ /forum/search.php?search_id=newposts&start=$2&sr=topics [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

    #####################################################
    # GYM Sitemaps & RSS
    # Global channels
    RewriteRule ^forum/rss(/(news)+)?(/(digest)+)?(/(short|long)+)?/?$ /forum/gymrss.php?channels&$2&$4&$6 [L,NC]
    # END GYM Sitemaps & RSS
    #####################################################

    # 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 ^forum/([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /forum/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
    # END PHPBB PAGES
    #####################################################

    #####################################################
    # GYM Sitemaps & RSS
    # Main feeds & channels
    RewriteRule ^forum/rss(/(news)+)?(/(digest)+)?(/(short|long)+)?(/([a-z0-9_-]+))?/([a-z0-9_]+)\.xml(\.gz)?$ /forum/gymrss.php?$9=$8&$2&$4&$6&gzip=$10 [L,NC]
    # Forum feeds
    RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /forum/gymrss.php?$8=$1&$3&$5&$7&gzip=$9 [L,NC]
    # Module feeds without ids
    RewriteRule ^forum/([a-z0-9_-]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /forum/gymrss.php?nametoid=$1&$3&$5&$7&modulename=$8&gzip=$9 [L,NC]
    # Google SitemapIndex
    RewriteRule ^forum/sitemapindex\.xml(\.gz)?$ /forum/sitemap.php?gzip=$1 [L,NC]
    # Forum sitemaps
    RewriteRule ^forum/[a-z0-9_-]+-f([0-9]+)\.xml(\.gz)?$ /forum/sitemap.php?forum=$1&gzip=$2 [L,NC]
    # Module sitemaps
    RewriteRule ^forum/([a-z0-9_]+)-([a-z0-9_-]+)\.xml(\.gz)?$ /forum/sitemap.php?$1=$2&gzip=$3 [L,NC]
    # END GYM Sitemaps & RSS
    #####################################################




AddHandler application/x-httpd-php5 php

deny from 85.198.1.9
deny from 217.219.53.254

RewriteCond %{HTTP_HOST} ^mobile4persian.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mobile4persian.com$
RewriteRule ^/?$ "http\:\/\/www\.mobile4persian\.com\/forum\/" [R=301,L]



but it is now :
http://www.mobile4persian.com/forum/sitemap.php

not xml !!!!!!!!!
what shoud i do now?
User avatar
Professional
PR5
PR5
 
Posts: 540
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Advertisement

Re: htacces help at GYm

Postby dcz » Sat Aug 23, 2008 10:09 am

Professional wrote:what shoud i do now?


Turn URL rewriting on in GYM ACP ;)

Rewriterules are in place, so it should work directly.

++
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: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby Professional » Sat Aug 23, 2008 2:12 pm

i actived all of them but
here is not rewrite:
http://www.mobile4persian.com/forum/sitemap.php

but here is rewrite:(second flor)
http://www.mobile4persian.com/forum/sitemap.php?forum=2

so what is the problem?
User avatar
Professional
PR5
PR5
 
Posts: 540
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Postby dcz » Wed Aug 27, 2008 8:04 am

Have you turned URL rewriting in the GYM main level ACP (by default it's overriding the output type settings) ?
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: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby Professional » Wed Aug 27, 2008 1:14 pm

dcz wrote:Have you turned URL rewriting in the GYM main level ACP (by default it's overriding the output type settings) ?


sorry i hadn't seen this :oops:
now it works perfect:
http://www.mobile4persian.com/forum/sitemapindex.xml.gz

after xm it has .gz is it normal?
if i want to change it to just xml what shoud i do and which of them is better?
User avatar
Professional
PR5
PR5
 
Posts: 540
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Postby Professional » Thu Aug 28, 2008 6:45 am

plz answer my post :oops:
User avatar
Professional
PR5
PR5
 
Posts: 540
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Postby dcz » Thu Aug 28, 2008 7:56 am

The .gz is here because gunzip is activated, you have an option to get rid of it even when gunzip is activated in the ACP, it's as you want.

++
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: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby Professional » Fri Aug 29, 2008 12:58 pm

dcz wrote:The .gz is here because gunzip is activated, you have an option to get rid of it even when gunzip is activated in the ACP, it's as you want.

++


tnaks i did it too :)
User avatar
Professional
PR5
PR5
 
Posts: 540
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World


Return to GYM Sitemaps & RSS

Who is online

Users browsing this forum: No registered users and 3 guests


 
cron