Forum Moderators: phranque

Message Too Old, No Replies

My URLs keep chaning by themselves:(

         

skunker

1:56 am on Jan 17, 2006 (gmt 0)

10+ Year Member



Folks, need your help with a problem I am getting when typing in URLs for my website.

For example, when I give someone a URL to one of the pages within my site

example: http://www.example.com/article/ra...Island-hotels/

They click it and then the URL switches by itself to:

http://www.example.com/view-article-details.php

And then that page's content dissapears with nothing left except the shell.

What the heck is going on? I suspect it's something in my htaccess file.

My htaccess file:
php_value session.use_only_cookies 1
php_value session.use_trans_sid 0

# -FrontPage-

RewriteEngine On

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.example.com
AuthUserFile /home/virtual/site17/fst/var/www/html/_vti_pvt/service.pwd
AuthGroupFile /home/virtual/site17/fst/var/www/html/_vti_pvt/service.grp

RewriteRule ^category/(.*)/$ /articles.php?catname=$1
RewriteRule ^allcategory/(.*)/$ /articles1.php?catname=$1
RewriteRule ^article/(.*)/(.*)/$ /view-article-details.php?articlename=$1&catname=$2 [L]
RewriteRule ^articles/(.*)/(.*)/$ /view-article-details.php?articleNamenew=$1&catnamenew=$2 [L]
RewriteRule ^article/(.*)/$ /view-article-details.php?articlename=$1 [L]
RewriteRule ^read/(.*)$ /read.php?articlename=$1 [L]
RewriteRule ^featured/$ /featured-stories-details.php [L]
RewriteRule ^featured/(.*)$ /featured-stories.php?featuredId=$1 [L]
RewriteRule ^signinchk/(.*)/$ /sign-in.php?err=$1 [L]
RewriteRule ^signinreview/(.*)/(.*)/(.*)/$ /sign-in.php?act=rew&articlename=$1&catname=$2&err=$3 [L]
RewriteRule ^signinreview/(.*)/(.*)/$ /sign-in.php?act=rew&articlename=$1&catname=$2 [L]
RewriteRule ^signin/(.*)/$ /sign-in.php?act=art&articlename=$1 [L]
RewriteRule ^signinart/(.*)/(.*)/$ /sign-in.php?act=art&articlename=$1&err=$2 [L]
RewriteRule ^signin/(.*)/(.*)/(.*)/$ /sign-in.php?act=art&articlename=$1&catname=$2&err=$3 [L]
RewriteRule ^signin/$ /sign-in.php [L]
RewriteRule ^review/(.*)/(.*)/$ /add-reviews.php?act=add&articlename=$1&catname=$2 [L]
RewriteRule ^reviews/$ /add-reviews.php [L]
RewriteRule ^reviews/(.*)/$ /add-reviews.php?id=$1 [L]
RewriteRule ^addreviews/(.*)/(.*)/$ /add-reviews.php?&articlename=$1&catname=$2 [L]
RewriteRule ^viewreview/(.*)/(.*)/$ /review.php?articlename=$1&catname=$2
RewriteRule ^favorite/(.*)/$ /view-favorites-listing.php?act=add&articlename=$1&err=$2 [L]
RewriteRule ^favorite/$ /view-favorites-listing.php [L]
RewriteRule ^favmsg/(.*)/$ /view-favorites-listing.php?err=$1 [L]
RewriteRule ^events/$ /view-events-listing.php [L]
RewriteRule ^events/(.*)$ /view-event-detail.php?eventId=$1 [L]
RewriteRule ^favremove/$ /view-favorites-listing.php?act=chkall [L]
RewriteRule ^favremoveno/$ /view-favorites-listing.php?act=chkallno [L]
RewriteRule ^viewallreview/(.*)/(.*)/$ /view-all-reviews.php?articlename=$1&catname=$2
RewriteRule ^search/$ /search-results.php [L]
RewriteRule ^thanks/$ /thanks-register.php [L]
RewriteRule ^thanks/(.*)/(.*)/$ /thanks-register.php?err=$1&articlename=$2&act=add [L]
RewriteRule ^changepass/$ /change-password.php [L]
RewriteRule ^logout/$ /logout.php [L]
RewriteRule ^advertise/$ /advertise.php [L]
RewriteRule ^catlisting/$ /view-category-listing.php [L]
RewriteRule ^signin/(.*)/$ /sign-in.php?err=$1 [L]
RewriteRule ^photos/(.*)/$ /view-photos.php?articleId=$1 [L]
RewriteRule ^thanks-comment/$ /thanks-comment.php [L]
RewriteRule ^thanks-subscribe/$ /thanks-subscribed.php [L]
RewriteRule ^thanks-subscribe/(.*)/$ /thanks-subscribed.php?err=$1 [L]
RewriteRule ^banner-click/(.*)/$ /banner-click.php?bannerId=$1 [L]
RewriteRule ^preview-image/(.*)/$ /preview-image.php?act=main&articleId=$1
RewriteRule ^unsubscribe/(.*)/$ /unsubscribe.php?subscribeId=$1 [L]
RewriteRule ^unsubscribemem/(.*)/$ /unsubscribe.php?memberId=$1 [L]
RewriteRule ^logout/$ /logout.php [L]

[edited by: jdMorgan at 2:11 am (utc) on Jan. 17, 2006]
[edit reason] Example.com per TOS. [/edit]

sonjay

4:00 am on Jan 17, 2006 (gmt 0)

10+ Year Member



I bet you can figure this one out by yourself. Look for a rewrite rule that takes a request for articles/something/ and that redirects to view-article-details.php

That particular rule would be your culprit.

skunker

5:15 am on Jan 17, 2006 (gmt 0)

10+ Year Member



Thanks, do i just remove that line altogether? Does this mean that those links will no longer be SEO friendly?

sonjay

12:27 pm on Jan 17, 2006 (gmt 0)

10+ Year Member



Hmmmm.... I think I misunderstood the problem. I thought that for some reason you did not want that type of URL or that particular URL rewritten, and that you would need to either remove or change the rewrite rule. Now, on reading your last post, and re-reading your first, it appears that your rewrite rule(s) is/are not working properly. Or do you indeed not want that particular URL rewritten? Do any of your rewrite rules work properly, or only ones in that particular format?

What URL should your example be rewritten to? Should it be rewritten to /view-article-details.php?articlename=ra...Island-hotels? Do you of your articles not have catnames, and that's why the two different /article/ rewrite rules? We need to find out what's supposed to be happening before we can figure out how to fix it.

I'm not that good at rewrite rules, so it's possible someone who is will come along and say, "Oh, you just need make this little change and everything will work."

jdMorgan

3:45 pm on Jan 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't see any redirects at all in your code -- only internal rewrites. Therefore the URLs you see in your browser will not change because of this code. The problem is likely to be in one or more of your scripts. Look for "Location" header writes -- those invoke external redirects.

Jim

jimbeetle

4:04 pm on Jan 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



A couple of things might be coming into play here.

First, do you have things set up so PHP works with Frontpage [google.com]?

Next, do you have things set up so .htaccess works with Frontpage [webmasterworld.com] msg 43?

Have no idea exactly how these would work against each other if not properly implemented, but assume there would be some weird symptoms popping up.

skunker

5:39 pm on Jan 17, 2006 (gmt 0)

10+ Year Member



It has been fixed. Don't know exactly what happened, but someone on another forum fixed it for me. Thanks guys!