homepage Welcome to WebmasterWorld Guest from 54.166.14.218
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Major Mod rewrite problem
Cannot access any new file uploaded to the server
illusionist

10+ Year Member



 
Msg#: 4081 posted 9:38 pm on Jul 13, 2005 (gmt 0)

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]

 

jd01

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4081 posted 9:51 pm on Jul 13, 2005 (gmt 0)

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

illusionist

10+ Year Member



 
Msg#: 4081 posted 1:37 pm on Jul 14, 2005 (gmt 0)

Yes correct its the entire file content.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved