London

SEO

 

Hi,

I have the next htaccess:

RewriteEngine On

RewriteRule ^(.*).html index.

php

 ?word=$1
RewriteCond %{HTTP_HOST} ^MYSITE

.net

 
RewriteRule (.*) http://www.MYSITE

.net

 /$1 [R=301]
RewriteRule ^starting-with-letter/([A-Z]+)/?$ /index.

php

 ?letter=$1
RewriteRule ^/([A-Z]+)/([0-9]+)/?$ index.

php

 ?letter=$1&pagenum=$2


I have some pagination running (you choose the letter A, B, C... so I only need to display

This

http://www.MYSITE

.net

 /starting-with-letter/A   (or any other letter, B, Z, O, P....)

Instead of this:

http://www.MYSITE

.net

 /index.

php

 ?letter=A 

But I can't get to make it work...


One more thing, if I click over letter A, let's say, the URL bar will display  http://www.MYSITE

.net

 /index.

php

 ?letter=A

BUT If I copy and paste this http://www.MYSITE

.net

 /starting-with-letter/A    I actually get the same page (it is displaying the same page) so, for some reason mod_rewrite is working in some way but it is no transforming

http://www.MYSITE

.net

 /index.

php

 ?letter=A

into this

http://www.MYSITE

.net

 /starting-with-letter/A

Any ideas?  Applause

Thank you

perkiset

Just posted this over @ synkd8 for you as well:
======================================

Two thoughts -

First off, just for clarity, I'd make another virtual host mysite.com and bounce it to www.mysite.com - I mean I'd move that little bit of processing out of your primary Virtual Host, because in this instance you're asking

Apache

  to evaluate every single URL called to see if it is an exception (ie., no "www"Applause

Next, I'd get to

PHP

  as quickly as possible ie.,
RewriteRule ^(.*)$  main.

php

 ?request=$1

... the processing of the URL will be more clean and easy to debug in

PHP

  than it will looking at rewrite logs for

Apache

 , which you may not even have access to on a shared host.

Applause
/p

London

SEO

 

Thank you Perkiset! Silly me, the problem was in the html genarated, I made some changes to output the right url and magic! it worked !  Applause


Perkiset's Place Home   Politics @ Perkiset's