phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
problem with htaccess redirect

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
::  
Author Message
macnack
PR0
PR0


Joined: 20 Jun 2006
Posts: 97

problem with htaccess redirectPosted: Sun Jul 02, 2006 9:09 am    Post subject: problem with htaccess redirect

Hello

I´ve a script on my site who make urls like
detektor.php?p=5
I include the script to mx as a block with new url like
index.php?page=14?p=5
actually htaccess rule
Code:
rewriteRule ^detektor.php(.*)$ http://www.detektoreninfo.de/index.php?page=14$1 [R=301,L]

but I think the ?p=5 doesn´t work

_________________
macnack
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

problem with htaccess redirectPosted: Sun Jul 02, 2006 9:20 am    Post subject: Re: problem with htaccess redirect

This is normal.

I moved this to Apache mod rewrite forum as it's more of a general mod Rewrite matter.

So you have got URLs like these :

index.php?page=14&p=5 not index.php?page=14?p=5

But the thing is why do you want to implement an HTTP 301 here, aren't you trying to URL rewrite those instead of just have them moved permanently ?

For example, if you had decided to use something like "detektorsxx.html" for this page, then you'd just have to use this rewriterule :

Code:
rewriteRule ^detektors([0-9]*)\.html$ /index.php?page=14&$1 [QSA,L]


Which will make correspond detektorsxx.html to index.php?page=14&p=xx

The only thing left to be done here is to make sure from now on you only use the detektorsxx.html standard to build these URLs, can be hard coded (you can as well think of a switch in your coding, like if $mod_rewrite then detektorsxx.html else index.php?page=14&p=xx, with $mod_rewrite set to TRUE or FALSE early enough in the code).

It should be fairly doable since it's your custom code that will output links and needs to be tweaked for this purpose, the mxBB part should not be more difficult than just to edit the menu nav setting and change the main access link to the new standard and to do the same everywhere you posted links to this module.

++

_________________
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
Visit poster's website
macnack
PR0
PR0


Joined: 20 Jun 2006
Posts: 97

problem with htaccess redirectPosted: Sun Jul 02, 2006 11:12 am    Post subject: Re: problem with htaccess redirect

I think you don´t understand me
I´ve include in htacces
Code:
rewriteRule ^detektor.php(.*)$ http://www.detektoreninfo.de/index.php?page=14$1 [R=301,L]

because there are old links
but If I run url domain.de/detektor.php?p=6
it will redirect me to
domain.de/index.php?page=14
I missed the &p=6

That what you are told me (detektorsxx.html) is on my to do list Wink

_________________
macnack
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

problem with htaccess redirectPosted: Sun Jul 02, 2006 5:12 pm    Post subject: Re: problem with htaccess redirect

lol I understand now Laughing

Anyway, good hints it seems Very Happy

_________________
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
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: