Forum Moderators: phranque

Message Too Old, No Replies

Something wrong with my website

         

edifice

5:43 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



hi,

i am not sure since when I have had this problem but it came to my notice today. please help, i am totally confused and clueless

the default page that it will bring up is /index.php

today I was trying to see all the pages indexed from my website and could see somevery old pages and then i did this...

www.my website.com/index.php/typeanythinghere

and it broghtup the home page without any css.. :-(

if you type anything after index.php/ , it will bring up a page no matter what you type.. :(

Can anyone please help me?

[edited by: txbakers at 11:06 pm (utc) on April 14, 2006]
[edit reason] no links to personal URLs please. [/edit]

jdMorgan

7:22 pm on Apr 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is 'the way it works' with many servers -- any "." following the slash separating the domain/local URL-path indicates a "filename" and ends directory-level parsing, so the trailing "/whatever" is ignored by the server.

However, it may not be ignored by the browser, and that could break relative-link resolution, causing your CSS and images to break.

I suppose you could fix it with a bit of mod_rewrite code on Apache, or an equivalent ISAPI Rewrite for IIS:


# remove directory paths appended to filenames
RewriteCond %{HTTP_HOST} .
RewriteRule ^([^.]+\.[^/]*)/ http://%{HTTP_HOST}/$1 [R=301,L]

Jim

edifice

3:10 am on Apr 16, 2006 (gmt 0)

10+ Year Member



Adding to what I had said earlier, this is the real probelm that I have.

My old website was built using mambo and I had enabled SEF resulting in my pages as index.php/content/view/17/33 but now I have removed mambo and built simple site using switch case statements. So now the current URLs are all index.php?url=pagename

But my old pages are still indexed in google and other major search engines. So when someone visits the site using [my...] website.com/index.php/content/view/17/33 the home page will come up without any css, js and includes.
I tried to remove the old indexed pages from google but it will not using the automatic url remove page because it sees that the old URL is still active :-(

In summary [my...] website.com/index.php/content/view/17/33 does not exist but one can still see something coming off this request if made.

Am I doing something wrong in my case statements?

jdMorgan

3:25 am on Apr 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As I said, anything following the "index.php" is ignored by the server. It may or may not be ignored by index.php (and I think not; Based on your description, index.php examines the requested URI and acts upon the information that follows "/index.php/").

So, you could either use the code I posted above to redirect all such non-standard URIs to index.php with all the trailing info removed, or you could modify index.php itself to look for old-style URIs and redirect them, 410-Gone them, or whatever you wish to do with them.

The basic problem is that (apparently) mambo encouraged the use of a non-standard (I'd almost say "invalid") URL-format as an expedient, and you're now suffering the consequences. See RFC2396 if you want all the details on well-formed URLs.

Jim

edifice

2:15 pm on Apr 16, 2006 (gmt 0)

10+ Year Member



Excellent!

Thank you so much. I am set now. Next I have to submit a removal request in google. I hope this time it works :-)