Ok, i followed Nintendo's mod_rewrite sticky post - and it worked flawlessly on my directory until i also tried to do a 301 redirect on certain pages within the directory. Now i think Google may be punishing me for it because ive lost a lot of indexed pages and some weird URLs are starting to show up in Yahoo. Here is the code for my .htaccess: AddType application/x-httpd-php .xml Redirect permanent /directory/335.php http://pghsource.cagintranet.com/directory/114.php Redirect permanent /directory/317.php http://pghsource.cagintranet.com/directory/70.php Redirect permanent /directory/320.php http://pghsource.cagintranet.com/directory/310.php Redirect permanent /directory/316.php http://pghsource.cagintranet.com/directory/118.php Redirect permanent /directory/339.php http://pghsource.cagintranet.com/directory/121.php Options +Indexes RewriteEngine on RewriteRule ^([0-9]+)/([0-9]+).php$ http://pghsource.cagintranet.com/directory/index.php?c=$2&s=$1 [L] RewriteRule ^([0-9]+).php$ http://pghsource.cagintranet.com/directory/index.php?c=$1 [L] Code (markup): Like i said - everythign worked fine until i put int he top lines about the permanent redirects. Now, when ever someone goes to one of the pages listed above, such as /directory/335.php they are redirected to /directory/114.php?c=335 At first i thoguht - "OK, so that will only happen with 5 pages, thats OK with me." But now in Yahoo - i am getting alot of my pages listed in that syntax... (/directory/xxx.php?c=xxx) - and these pages aren't listed in the 301 section at all. See a screenshot of it here: http://pghsource.cagintranet.com/ERROR.gif Can anyone see an error in my htaccess? Ive ran it though validators and nothing is showing up as a problem.
Is http://pghsource.cagintranet.com/directory/121.php the kind of URL used for the code ^([0-9]+).php Try puting the Redirect permanent lines last and see if that fixes it. Or try RewriteRule ^directory/335.php$ http://pghsource.cagintranet.com/directory/114.php [R=301,L] RewriteRule ^directory/317.php$ http://pghsource.cagintranet.com/directory/70.php [R=301,L] RewriteRule ^directory/320.php$ http://pghsource.cagintranet.com/directory/310.php [R=301,L] RewriteRule ^directory/316.php$ http://pghsource.cagintranet.com/directory/118.php [R=301,L] RewriteRule ^directory/339.php$ http://pghsource.cagintranet.com/directory/121.php [R=301,L]
Thanks Nintendo... I tried switching the order in htaccess to modrewrite then 301. I also tried the code you suggested above... still the same exact thing happens both times. I feel like ive done something terribly wrong b/c i've went from 230 pages indexed in my directory to now 19...http://www.google.com/search?q=site...ient=firefox-a&rls=org.mozilla:en-US:official
If you got the .php URLs indexed, it's usually best to just leave it like that. Look at the thread URLs here for example!!!! Hopefully it's just Google being on crack that did that. It's probably the infinite loop going bonkers that's keeping it from working.