Welcome to WebmasterWorld Guest from 54.167.174.11

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Major Mod rewrite problem

Cannot access any new file uploaded to the server

   
9:38 pm on Jul 13, 2005 (gmt 0)

10+ Year Member



I had hired a freelance programmer to do a mod rewrite on my website. I recently came across a bug caused due to the mod rewrite, whenever i upload a new file to the server and try accessing its url ( www.mysite.com/filename.htm) it gives me a 404 error! I cannot contact the person who originaly did the mod rewrite.

Below are the conetns of the .htaccess file

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

order deny,allow
deny from all
allow from all

order deny,allow
deny from all

AuthName www.site.com
AuthUserFile /home/site/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/site/public_html/_vti_pvt/service.grp

# Rewrite Rules
#RewriteEngineon
#RewriteRule^xredirect:(.+)/cgi-bin/redirect.pl?name=$1

#IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
AddType application/x-httpd-php .xml

RewriteEngine On

#RewriteRule ^/forums/(.*) [forums.site.com...] [L,R=301]

RewriteCond %{HTTP_HOST} ^site\.com$
RewriteRule ^(.*) [site.com...] [L,R=301]

#RewriteCond %{REQUEST_URI}!forums/
RewriteCond %{REQUEST_URI}!images/
RewriteCond %{REQUEST_URI}!admincp/
RewriteCond %{REQUEST_URI}!ad/
RewriteCond %{REQUEST_URI}!testibp/
RewriteCond %{REQUEST_URI}!ads/

Can anyone please help me?

[edited by: jdMorgan at 2:24 pm (utc) on July 14, 2005]
[edit reason] Disabled smileys in code. [/edit]

9:51 pm on Jul 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi illusionist,

Below are the conetns of the .htaccess file

Is this the *exact* *complete* .htaccess file? Or, have you made adjusments?

The reason I ask is:
Everything with a # preceding it is commented out IOW has no effect.

These Lines:
#RewriteCond %{REQUEST_URI}!forums/
RewriteCond %{REQUEST_URI}!images/
RewriteCond %{REQUEST_URI}!admincp/
RewriteCond %{REQUEST_URI}!ad/
RewriteCond %{REQUEST_URI}!testibp/
RewriteCond %{REQUEST_URI}!ads/

Do nothing, unless there is a RewriteRule at the bottom of the file that is not posted.

The correct .htaccess file syntax for the forum rewrite, which is also commented out is:

#RewriteRule ^forums/(.*) http://www.forums.site.com/$1 [L,R=301]

Please, note the removal of the preceding / from the Rule.

Could you please let us know about these questions, because as of right now the only Rewrite that looks to be functioning correctly is the redirect from the non-www version to the www version, and this should not cause any other access issues.

Justin

1:37 pm on Jul 14, 2005 (gmt 0)

10+ Year Member



Yes correct its the entire file content.