| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Dec 2005
Posts: 337
![]() ![]() | htaccess help please. my site is jacked up I'm trying to fix my site http://www.layoutpimps.net It is so weird ????: NamePros.com http://www.namepros.com/programming/365476-resolved-htaccess-help-please-my-site.html for example. http://www.layoutpimps.net/friends does work http://www.layoutpimps.net/friends/index.php reroutes back to the homepage http://www.layoutpimps.net/friends/ reroutes back to the homepage Currently, I have this in my htaccess ErrorDocument 404 /index.php so thats why http://www.layoutpimps.net/friends/ reroutes back to the homepage. This site is a complete mess in Google's eyes. Why is it if you add a / or a /index.php are the URLs considered 404 errors? All three of those links need to go to the same place and be considered the same URL. Is there anything I can add to my htaccess to fix this problem? It does it to all my URLs and it's been like this for a year! I just now noticed it.
__________________ Read My Blog - http://www.lithman.net |
| |
| | #2 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | is that the complete content of the htaccess file? Do you do any rerouting in the php script itself?
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #3 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | ok just received your pm http://www.layoutpimps.net/friends/index.php is rerouting back to the home page as you are not catching it anywhere. I presume this file is not actually a real file. This being the case the 404 line is dealing with this. If you wish to change this behaviour you need to create a line to catch this URL Regarding http://www.layoutpimps.net/friends working and http://www.layoutpimps.net/friends/ not working this is because you are only catching in the htaccess without the slash in the following line RewriteRule ^friends$ index.php?app=friends [L] if you wish to catch both change it to the following:- RewriteRule ^friends(/)?$ index.php?app=friends [L] ????: NamePros.com http://www.namepros.com/showthread.php?t=365476 this makes the slash optional (hence the ?).
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #4 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | never heard back did this 100% fix the problem you had
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |