Forum Moderators: phranque
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]
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]
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?
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