| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
mayberry
Joined: 31 May 2006 Posts: 1
|
Posted: Wed May 31, 2006 6:50 pm Post subject: keyword-urls-mod_2.3.1 rewriterule |
|
|
[english support]
When I try to access a directory other than the root I get 404 errors.
Ex: root/dir1/dir2/file.html = 404
I removed this line > RewriteRule ^.+/([^/]+\.html)$ /$1 [R=301,L] < from the htaccess and now it works, but I dont know why.
What does that line do? Is it required to be there? (I know nothing about apache rewrites.)
Thanks. |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
Posted: Wed May 31, 2006 7:15 pm Post subject: Re: keyword-urls-mod_2.3.1 rewriterule |
|
|
Hello
This rule is here to prevent what I call virtual folder injection and that's exactly the one disturbing you here.
It prevents url like this www.example.com/phpBB/virtualfolder/topic-title-vtxx.html to work, thus breaking all images paths and performing many 404's on the server.
With this rule, this extra folder will just get removed.
Then, this mean that anything ending with .html within a sub folder located under the one where this rule is set won't work.
You can either get rid of this additional protection or try something like :
| Code: | RewriteCond %{REQUEST_URI} !/(folder1|folder2|folder3|...) [NC]
RewriteRule ^.+/([^/]+\.html)$ /$1 [R=301,L] |
Where folder1,2,3 would be your folder containing .html content.
Then, as I told you on phpbb-fr.com, you should consider updating to one of the phpBB SEO mod Rewrites, the advanced one will keep the same url standard, but will eventually need some small adaptation, so pleas start a new thread if you want to migrate. The required steps are easy and already achieved in the french forum.
Reason to migrate : a faster code and a nicely rewritten pagination without any duplicates
As well, once you will have decided yourself on this, and if not done already, you should look at the mx Google Sitemaps And mx Sitemaps modules, they both support all phpBB SEO mod Rewrites as well as many others
++ |
_________________ 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 |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |