1
   

phpBB static URLs mod_rewrite 1.0.0

 
 
Reply Wed 17 Nov, 2004 07:47 am
hi,

i have installed "phpBB static URLs mod_rewrite 1.0.0" successfully.
the only mistake was , i´ve forgotten to upload robots.txt

and then i have changed

Code:post- -> beitrag-
forum- -> film-kino-forum-
about- -> kino-news-


unfortunally google found its way to the website before i´ve done this.

now there a lot of serps
with post-x.html because robots.txt was missing
no one with about-x.html because of the double content to post (lucky me)
and forum-y.html in the index of google.

now if added

Code:Disallow: beitrag-*.html$
Disallow: forum-*.html$


to robots.txt to lock out post, beitrag und forum

and added

Code:RewriteRule ^forum-([0-9]*).html film-kino-forum-$1.html [R=301,L]
RewriteRule ^forum-([0-9]*).* film-kino-forum-$1.html [R=301,L]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) beitrag-$1.html&highlight=$2 [R=301,L]
RewriteRule ^post-([0-9]*).* beitrag-$1.html [R=301,L]


to .htaccess, rewriting post and forum as long as they are in the index

this works also fine and the google results find their way to
the target.

my question is:

is this well done or only good luck of a stupid guy?

regards
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 4,235 • Replies: 11
No top replies

 
bugscout
 
  1  
Reply Fri 19 Nov, 2004 05:11 am
hi,

it works fine
no double content and everything is like
ist should be

regards
0 Replies
 
mrcolj
 
  1  
Reply Mon 31 Jan, 2005 01:01 pm
Question, I installed the phpBB static URLs mod_rewrite, and have checked it over, and am pretty sure I didn't make any mistakes in those very basic directions... and yet I can't get it to work. All the .html links just go to a Page Not Found error. Will someone advise, and possibly look at it on my site?
0 Replies
 
Craven de Kere
 
  1  
Reply Mon 31 Jan, 2005 01:17 pm
I think you missed or messed up on the .htaccess part (should be in your forum directory, in case you put it elsewhere).
0 Replies
 
mrcolj
 
  1  
Reply Mon 31 Jan, 2005 01:44 pm
Yes, I was having trouble with the .htaccess part. I didn't have an .htaccess file at all in my forum folder, so I just created one, with your code in it, and placed it there (mysite/phpBB2/.htaccess). It doesn't have anything in there, other than:
Code:RewriteEngine On
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]

Thanks for your continuing help, Craven.
0 Replies
 
Craven de Kere
 
  1  
Reply Mon 31 Jan, 2005 10:17 pm
Try adding "RewriteBase /" right after "RewriteEngine On".
0 Replies
 
mrcolj
 
  1  
Reply Tue 1 Feb, 2005 09:18 am
Done, but straight back to a 404 error.
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 1 Feb, 2005 11:17 am
Look in your error logs, and see what files access attempts are associated with the 404 errors.
0 Replies
 
mrcolj
 
  1  
Reply Tue 1 Feb, 2005 12:03 pm
Pretty expected replies, except the last two:

Code:File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/post-76.html

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/about108.html

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/forum-9.html

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/forum-11.html

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/about6-30.html

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/post-1392.html

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/forum-17.html, referer: http://www.mysite.com/phpBB2/index.php

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/forum-8.html, referer: http://www.mysite.com/phpBB2/index.php

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/post-1406.html, referer: http://www.mysite.com/phpBB2/index.php

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/forum-11.html, referer: http://www.mysite.com/phpBB2/index.php

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/forum-8.html, referer: http://www.mysite.com/phpBB2/index.php

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/post-1460.html, referer: http://www.mysite.com/phpBB2/index.php

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/post-1460.html, referer: http://www.mysite.com/phpBB2/index.php

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/forum-8.html, referer: http://www.mysite.com/phpBB2/index.php

client denied by server configuration: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/.htaccess

File does not exist: /usr/local/apache2/htdocs/www.mysite.com/phpBB2/htaccess.txt


These last two are probably it, but searching my code, there's no reference to a htaccess.txt, and said file doesn't exist. And I don't know what the previous error means. The .htaccess file is chmodded to 644, if that matters.
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 1 Feb, 2005 10:02 pm
It doesn't look like the rewrite rules are being attempted at all.

Assuming you created the .htaccess file correctly, ask your server administrator about it.
0 Replies
 
mrcolj
 
  1  
Reply Wed 2 Feb, 2005 02:08 pm
Okay, the server administrator is thinking he doesn't have the mod_rewrite apache module installed, or maybe just not enabled. I'll keep you informed if/when we get it solved.
0 Replies
 
Craven de Kere
 
  1  
Reply Thu 3 Feb, 2005 06:35 pm
http://www.able2know.com/forums/viewtopic.php?p=1160979#1160979
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » phpBB static URLs mod_rewrite 1.0.0
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.04 seconds on 12/28/2024 at 07:11:09