Unable to get rewrite to work with mod

Discussions and support about the different URL Rewriting techniques for phpBB.

Moderator: Moderators

Unable to get rewrite to work with mod

Postby nagrap » Mon Feb 27, 2012 1:15 am

Hi

I have recently installed v3.0.10 of phpbb and installed phpBB SEO Ultimate SEO URL V 0.7.0 mod. But I am unable to get the rewrite functionality to work.

I have checked with my hosting company (GoDaddy) and they have confirmed mod rewrite is enabled on the account. I did a simple test by redirecting a test.html page to google.co.uk and it worked fine.

But when I upload the .htaccess file generated via the above mod in simple mode, none of the URLs are converted to their friendly version. I have also cleared the cache. Please help !!! What else can I do/check?

website is: http://www.worldserieshockeyforum.com

I have used the following code in .htaccess:

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 lines
    # Options +FollowSymlinks
    # To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
    # Options -MultiViews
    # REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
    RewriteEngine On
    # Uncomment the statement below if you want to make use of
    # HTTP authentication and it does not already work.
    # This could be required if you are for example using PHP via Apache CGI.
    # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    # REWRITE BASE
    RewriteBase /
    # HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
    # RewriteCond %{HTTP_HOST} !^www\.worldserieshockeyforum\.com$ [NC]
    # RewriteRule ^(.*)$ http://www.worldserieshockeyforum.com/$1 [QSA,L,R=301]

    # DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    #####################################################
    # PHPBB SEO REWRITE RULES ALL MODES
    #####################################################
    # 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\.html$ /index.php [QSA,L,NC]
    # FORUM ALL MODES
    RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)(-([0-9]+))?\.html$ /viewforum.php?f=$2&start=$4 [QSA,L,NC]
    # TOPIC WITH VIRTUAL FOLDER ALL MODES
    RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
    # TOPIC WITHOUT FORUM ID & DELIM ALL MODES
    RewriteRule ^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
    # PHPBB FILES ALL MODES
    RewriteRule ^resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /download/file.php?id=$2&t=$1 [QSA,L,NC]
    # PROFILES ALL MODES WITH ID
    RewriteRule ^(member|[a-z0-9_-]*-u)([0-9]+)\.html$ /memberlist.php?mode=viewprofile&u=$2 [QSA,L,NC]
    # USER MESSAGES ALL MODES WITH ID
    RewriteRule ^(member|[a-z0-9_-]*-u)([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /search.php?author_id=$2&sr=$3&start=$5 [QSA,L,NC]
    # GROUPS ALL MODES
    RewriteRule ^(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
    # POST
    RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
    # ACTIVE TOPICS
    RewriteRule ^active-topics(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
    # UNANSWERED TOPICS
    RewriteRule ^unanswered(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
    # NEW POSTS
    RewriteRule ^newposts(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
    # UNREAD POSTS
    RewriteRule ^unreadposts(-([0-9]+))?\.html$ /search.php?search_id=unreadposts&start=$2 [QSA,L,NC]
    # THE TEAM
    RewriteRule ^the-team\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
    # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

    # FORUM WITHOUT ID & DELIM ALL MODES
    # THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([a-z0-9_-]+)\.html$ /viewforum.php?forum_uri=$1 [QSA,L,NC]
    # FIX RELATIVE PATHS : FILES
    RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /$1 [QSA,L,NC,R=301]
    # FIX RELATIVE PATHS : IMAGES
    RewriteRule ^.+/(styles/.*|images/.*)/$ /$1 [QSA,L,NC,R=301]
    # END PHPBB PAGES
    #####################################################

nagrap
 
Posts: 7
Joined: Mon Feb 27, 2012 1:03 am

Advertisement

Re: Unable to get rewrite to work with mod

Postby Stephen26 » Mon Feb 27, 2012 7:05 am

Your style "coffee_time" misses the necessary Prosilver / subsilver2 code changes - You can try out URL rewrite with prosilver first.
I install and configure phpBB-SEO (and other mods) for a fair price and very fast. If you are interested simply send me a private message.
Stephen26
phpBB SEO Team
phpBB SEO Team
 
Posts: 416
Joined: Mon May 03, 2010 7:06 am

Re: Unable to get rewrite to work with mod

Postby nagrap » Mon Feb 27, 2012 10:27 pm

Stephen

I have now uploaded the prosilver files, but it still isn't working. Please help...
nagrap
 
Posts: 7
Joined: Mon Feb 27, 2012 1:03 am

Re: Unable to get rewrite to work with mod

Postby Stephen26 » Tue Feb 28, 2012 6:46 am

Are these the prosilver files from the phpBB-SEO premod? Have you cleared the board cache (eventually refreshed template / theme / imageset)?
I install and configure phpBB-SEO (and other mods) for a fair price and very fast. If you are interested simply send me a private message.
Stephen26
phpBB SEO Team
phpBB SEO Team
 
Posts: 416
Joined: Mon May 03, 2010 7:06 am

Re: Unable to get rewrite to work with mod

Postby nagrap » Tue Feb 28, 2012 8:25 am

Stephen

Yes I have uploaded prosilver files from the seo mod and clicked on purge within general tab against cache. Is there anything else I should be doing?
nagrap
 
Posts: 7
Joined: Mon Feb 27, 2012 1:03 am

Re: Unable to get rewrite to work with mod

Postby Stephen26 » Tue Feb 28, 2012 9:41 am

nagrap wrote:But when I upload the .htaccess file generated via the above mod in simple mode, none of the URLs are converted to their friendly version.

So what exactly happens when you activate URL rewriting (nothing)? If with "friendly version" you mean URLs like .../topic-title-t1.html you have to use advanced rewrite mode for that (which makes generating a new .htaccess file necessary btw). Checking phpBB Server and Cookie settings never hurts.
I install and configure phpBB-SEO (and other mods) for a fair price and very fast. If you are interested simply send me a private message.
Stephen26
phpBB SEO Team
phpBB SEO Team
 
Posts: 416
Joined: Mon May 03, 2010 7:06 am

Re: Unable to get rewrite to work with mod

Postby nagrap » Tue Feb 28, 2012 9:49 am

Stephen,

OK so you are saying I need to use Advanced mode for urls like: .../topic-title-t1.html ?

So what does the Simple mode provide and how do I test to see if Simple mode is working?
nagrap
 
Posts: 7
Joined: Mon Feb 27, 2012 1:03 am

Re: Unable to get rewrite to work with mod

Postby Stephen26 » Tue Feb 28, 2012 11:09 am

nagrap wrote:OK so you are saying I need to use Advanced mode for urls like: .../topic-title-t1.html ?

Exactly.

nagrap wrote:So what does the Simple mode provide and how do I test to see if Simple mode is working?



◦phpBB SEO Ultimate SEO URL
This Premod will allow you to choose among the following URL rewriting standards in phpBB ACP :

Ultimate SEO URL in Advanced mode

Advanced URL rewriting for phpBB URLs, injecting forums and topic titles in their URLs, each URL being rewritten once, no matter the number of links using it on the page.
The mod will allow you to dissociate forum titles from their URLs, you will be able to choose the keywords used in your forums URLs using a friendly interface.
The Advanced mod is the "harder" to deal with, it implies a good topic title moderation to really be better than the Mixed one.
This feature requires running Apache server with mod_rewrite module loaded, or IIS server running isapi_rewrite.

Ultimate SEO URL in Mixed mode

Mixed URL rewriting for phpBB URLs, injecting forums titles in their URLs but keeping a static default rewriting for topics.
Each URL is rewritten once, no matter the number of links using it on the page.
The mod will allow you to dissociate forum titles from their URLs, you will be able to choose the keywords used in your forums URLs using a friendly interface.
The Mixed mod is recommended in most cases, the better easy to deal with / SEO performance ratio of the three standards.
This feature requires running Apache server with mod_rewrite module loaded, or IIS server running isapi_rewrite.

Ultimate SEO URL in Simple mode

Simple URL rewriting for phpBB URLs, static URL rewriting.
Each URL is rewritten once, no matter the number of links using it on the page.
It's the simplest one, recommended for 100% non Latin char-set forums.
This feature requires running Apache server with mod_rewrite module loaded, or IIS server running isapi_rewrite.

phpBB SEO Premod V 3.0.10
I install and configure phpBB-SEO (and other mods) for a fair price and very fast. If you are interested simply send me a private message.
Stephen26
phpBB SEO Team
phpBB SEO Team
 
Posts: 416
Joined: Mon May 03, 2010 7:06 am

Re: Unable to get rewrite to work with mod

Postby nagrap » Tue Feb 28, 2012 11:34 am

Stephen

Thanks for baring with me on this. I probably sound a bit thick but what does the below mean in plain english? Are you able to give me an example of what the URL will look like?

Ultimate SEO URL in Simple mode

Simple URL rewriting for phpBB URLs, static URL rewriting.
Each URL is rewritten once, no matter the number of links using it on the page.
It's the simplest one, recommended for 100% non Latin char-set forums.
This feature requires running Apache server with mod_rewrite module loaded, or IIS server running isapi_rewrite.
nagrap
 
Posts: 7
Joined: Mon Feb 27, 2012 1:03 am

Re: Unable to get rewrite to work with mod

Postby Stephen26 » Tue Feb 28, 2012 11:39 am

nagrap wrote:Thanks for baring with me on this. I probably sound a bit thick but what does the below mean in plain english? Are you able to give me an example of what the URL will look like?


Simple mode: www.example.com/topic1.html
I install and configure phpBB-SEO (and other mods) for a fair price and very fast. If you are interested simply send me a private message.
Stephen26
phpBB SEO Team
phpBB SEO Team
 
Posts: 416
Joined: Mon May 03, 2010 7:06 am

Re: Unable to get rewrite to work with mod

Postby nagrap » Tue Feb 28, 2012 12:24 pm

Stephen

The thing is even simple mode is not working.
nagrap
 
Posts: 7
Joined: Mon Feb 27, 2012 1:03 am

Re: Unable to get rewrite to work with mod

Postby Stephen26 » Tue Feb 28, 2012 12:49 pm

nagrap wrote:Hi

I have recently installed v3.0.10 of phpbb and installed phpBB SEO Ultimate SEO URL V 0.7.0 mod. But I am unable to get the rewrite functionality to work.



So you've used the standard phpBB package from http://www.phpbb.com and then installed Ultimate SEO URL V 0.7.0 on a new board? It would be much easier to start with the phpBB SEO Premod in that case.
I install and configure phpBB-SEO (and other mods) for a fair price and very fast. If you are interested simply send me a private message.
Stephen26
phpBB SEO Team
phpBB SEO Team
 
Posts: 416
Joined: Mon May 03, 2010 7:06 am


Return to phpBB mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 10 guests