
![]() |
London
SEO
Hi,
I have the next htaccess: RewriteEngine On RewriteRule ^(.*).html index. php?word=$1RewriteCond %{HTTP_HOST} ^MYSITE .netRewriteRule (.*) http://www.MYSITE .net/$1 [R=301]RewriteRule ^starting-with-letter/([A-Z]+)/?$ /index. php?letter=$1RewriteRule ^/([A-Z]+)/([0-9]+)/?$ index. php?letter=$1&pagenum=$2I 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=ABut 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=ABUT 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 transforminghttp://www.MYSITE .net/index.php?letter=Ainto this http://www.MYSITE .net/starting-with-letter/AAny ideas? ![]() 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 Apacheto evaluate every single URL called to see if it is an exception (ie., no "www"![]() Next, I'd get to PHPas quickly as possible ie.,RewriteRule ^(.*)$ main. php?request=$1... the processing of the URL will be more clean and easy to debug in PHPthan it will looking at rewrite logs forApache, which you may not even have access to on a shared host.![]() /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 !
![]() |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads