| |
|
| :: |
| Author |
Message |
janmyszkier
Joined: 12 Oct 2007 Posts: 41 Location: Wroclaw, Poland.
|
Posted: Sat Nov 03, 2007 2:01 pm Post subject: url rewrite - few lines doesn't work... |
|
|
Hey i've tried to use this tool to be sure i'm getting good rule
http://www.iwebtool.com/htaccess_url_rewrite?url=encyclopedy.php%3Faction%3Dtext%26id%3D15%26what%3Dart&ext=.html&sep=-
and,
i get nothing
o want this link:
-http://owadozery.pl/#encyclopedy?action=text&id=520&what=art
to be this link:
-http://owadozery.pl/encyclopedy/art-520.html
I have follow symlinks uncommented but it still doesn't work. anyone can bring some light on this?
to be exact, here's my htaccess from site index:
| Code: |
# 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
RewriteRule ^-action-(.*)-id-(.*)-what-(.*)\.html encyclopedy.php?action=$1&id=$2&what=$3 [QSA,L,NC]
#####################################################
# 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
#####################################################
|
|
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13607
|
Posted: Sat Nov 03, 2007 5:50 pm Post subject: Re: url rewrite - few lines doesn't work... |
|
|
| janmyszkier wrote: |
o want this link:
-http://owadozery.pl/#encyclopedy?action=text&id=520&what=art
to be this link:
-http://owadozery.pl/encyclopedy/art-520.html
|
First, adding a rewriterule in the .htaccess won't be enough to perform the url rewriting, it will only allow you to eventually use rewritten urls, it's still up to you to make your site using the new urls.
So, basically, you'd like a rewriterule able to take care of links such as : title-xx.html. It may be handy, depending on if you plan to url rewrite other type of urls, to add a delimiter to narrow the match, like title-exx.html, wher "-e" would allow us to always know this url is linked to encyclopedy?action.
Your suggestion is using "-" as delimiter, I tend to keep it for pagination parameter, to allow urls such as title-exx-yy.html where yy would be the page parameter.
It's not very important in your case, since you suggest the use of a virtual folder, which will play more or less the same role (all url there will be linked to the same script).
The problem in your cas is the #encyclopedy, it's JS. We need the physical file here, -http://www.owadozery.pl/encyclopedy?action=text&id=520&what=art will not work, -http://www.owadozery.pl/encyclopedy.php?action=text&id=520&what=art works with problems.
Anyway, the rewriterule you'd like is :
| Code: | | RewriteRule ^encyclopedy/([a-z0-9_-]+)-([0-9]+)\.html$ /encyclopedy.php?action=text&id=$2&what=$1 [QSA,L,NC] |
You can use :
| Code: | | RewriteRule ^encyclopedy/(.+)-([0-9]+)\.html$ /encyclopedy.php?action=text&id=$2&what=$1 [QSA,L,NC] |
to allow the use of any characters in the title, but it's usually safer and enough to narrow the match to alphanumeric characters, plus - and _.
++ |
_________________ 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 |
|
 |
janmyszkier
Joined: 12 Oct 2007 Posts: 41 Location: Wroclaw, Poland.
|
Posted: Sat Nov 03, 2007 7:49 pm Post subject: Re: url rewrite - few lines doesn't work... |
|
|
-http://www.owadozery.pl/encyclopedy.php?action=text&id=14&what=art
i have this link to exact article, but still.... what do you mean it may work with problems?
where text, 14, art are variables that change when moving through the site.
| dcz wrote: |
, it's still up to you to make your site using the new urls.
|
can you guide me somewhere when i could read how to do so? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13607
|
Posted: Thu Nov 08, 2007 2:40 pm Post subject: Re: url rewrite - few lines doesn't work... |
|
|
Well, there is quite a difference between the page shown on the url you mention and this one -http://owadozery.pl/#encyclopedy?action=text&id=520&what=art
And only -http://www.owadozery.pl/encyclopedy.php?action=text&id=520&what=art is actually spiderable.
So, you may want to find another way to embed it in your main style layout.
Then, about how to modify the links outputted by your script, it really depend on your script. If you know a bit of phpBB it should not be this difficult to find out where these are build and how to alter them.
Of course, this is not something one can guess without looking at the script.
++ |
_________________ 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 |
|
 |
janmyszkier
Joined: 12 Oct 2007 Posts: 41 Location: Wroclaw, Poland.
|
Posted: Thu Nov 08, 2007 3:40 pm Post subject: Re: url rewrite - few lines doesn't work... |
|
|
well, yes i think the problem won't be solved you may close the topic, but thank you all for efforts ^_^ |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13607
|
|
| Back to top |
|
 |
salik
Joined: 05 Mar 2008 Posts: 8
|
Posted: Wed Mar 05, 2008 1:17 pm Post subject: Re: url rewrite - few lines doesn't work... |
|
|
| i m using phpbb3premod extract and install in my local pc with running xammp phpbb3seo mod is not working when i place htacess in my forum root i got an error 404 plz help |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13607
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|