nsForum logo

Welcome Guest ( Log In )

 
Reply to this topicStart new topic
> Rewrite Htaccess, halts in firefox, not in ie
freelife
post Apr 24 2012, 05:17 PM
Post #1





Group: Verified NS Member
Posts: 4
Joined: 3-July 11
Member No.: 14,628



Im handling a website, where we use rewrite but seem to have some problems here on NS. I read post about this issue, but it seems like it works better on ie !
In firefox I get 200 OK -> The server encountered an internal error or
misconfiguration and was unable to complete your request.

I have RewriteBase /

and essentially how this website uses the rewrite is like this:

#Rewites PHP file to PHP directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.php$ PHP/$1\.php [L]

#All other files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)$ PHP/transform.php?page=$1 [L]

The problem occurs when loading the ADMIN/index.php
header ('Location: ADMIN/');

ie it loads, however in firefox it will halt, but not allways!
I guess it could be a time out ?

Go to the top of the page
 
+Quote Post
Craig
post Apr 24 2012, 07:04 PM
Post #2





Group: Administrators
Posts: 795
Joined: 23-June 08
From: Pennsylvania
Member No.: 1,317



QUOTE (freelife @ Apr 24 2012, 06:17 PM) *
Im handling a website, where we use rewrite but seem to have some problems here on NS. I read post about this issue, but it seems like it works better on ie !
In firefox I get 200 OK -> The server encountered an internal error or
misconfiguration and was unable to complete your request.

I have RewriteBase /

and essentially how this website uses the rewrite is like this:

#Rewites PHP file to PHP directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.php$ PHP/$1\.php [L]

#All other files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)$ PHP/transform.php?page=$1 [L]

The problem occurs when loading the ADMIN/index.php
header ('Location: ADMIN/');

ie it loads, however in firefox it will halt, but not allways!
I guess it could be a time out ?

RewriteRuiles do not use regular expressions and do not need special characters like the period escaped (i.e. you would use "$1.php" not "$1\.php"). You only need that in RewriteCond.

The target for the RewriteRule should always start with "http://" or "/" (i.e. "RewriteRule (.*)$ /PHP/transform.php?page=$1 [L]")

Go to the top of the page
 
+Quote Post
freelife
post Apr 25 2012, 02:42 AM
Post #3





Group: Verified NS Member
Posts: 4
Joined: 3-July 11
Member No.: 14,628



Hi Craig

Thanks for the correction.

But it does not solve the problem.
Could It be something else that makes it halt ? Im still thinking why this is an issue in firefox and not ie !

Is their any setting im missing out ?
any feedback would be appreciated thanks

Here is a screendump that halts
login.php -> header ('Location: ADMIN/'); hence loads index.php
(IMG:http://034068e.netsolhost.com/d.jpg)
Go to the top of the page
 
+Quote Post
freelife
post Apr 25 2012, 11:17 AM
Post #4





Group: Verified NS Member
Posts: 4
Joined: 3-July 11
Member No.: 14,628



Here is my full root htaccess code

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

#Rewites SWF file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.swf$ /HTML/$1.swf [L]

#Rewites MOV file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.mov$ /HTML/$1.mov [L]

#Rewites ICO file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.ico$ /HTML/$1.ico [L]

#Rewites PDF file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.pdf$ /HTML/$1.pdf [L]

#Rewites ZIP file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.zip$ /HTML/$1.zip [L]

#Rewites CSS file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.css$ /HTML/$1.css [L]

#Rewites JPG file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.jpg$ /HTML/$1.jpg [L]

#Rewites m4v file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.m4v$ /HTML/$1.m4v [L]

#Rewites mp4 file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.mp4$ /HTML/$1.mp4 [L]

#Rewites GIF file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.gif$ /HTML/$1.gif [L]

#Rewites PNG file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.png$ /HTML/$1.png [L]

#Rewites FLV file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.flv$ /HTML/$1.flv [L]

#Rewites JavaScript file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule javascripts/(.*)\.js$ /JavaScripts/$1.js [L]

#Rewites OTHER JS file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.js$ /HTML/$1.js [L]

#Rewites PHP file to PHP directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.php$ /PHP/$1.php [L]

#All other files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)$ /PHP/transform.php?page=$1 [L]

Go to the top of the page
 
+Quote Post
Craig
post Apr 25 2012, 09:02 PM
Post #5





Group: Administrators
Posts: 795
Joined: 23-June 08
From: Pennsylvania
Member No.: 1,317



QUOTE (freelife @ Apr 25 2012, 12:17 PM) *
Here is my full root htaccess code

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

#Rewites SWF file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.swf$ /HTML/$1.swf [L]

#Rewites MOV file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.mov$ /HTML/$1.mov [L]

#Rewites ICO file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.ico$ /HTML/$1.ico [L]

#Rewites PDF file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.pdf$ /HTML/$1.pdf [L]

#Rewites ZIP file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.zip$ /HTML/$1.zip [L]

#Rewites CSS file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.css$ /HTML/$1.css [L]

#Rewites JPG file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.jpg$ /HTML/$1.jpg [L]

#Rewites m4v file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.m4v$ /HTML/$1.m4v [L]

#Rewites mp4 file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.mp4$ /HTML/$1.mp4 [L]

#Rewites GIF file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.gif$ /HTML/$1.gif [L]

#Rewites PNG file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.png$ /HTML/$1.png [L]

#Rewites FLV file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.flv$ /HTML/$1.flv [L]

#Rewites JavaScript file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule javascripts/(.*)\.js$ /JavaScripts/$1.js [L]

#Rewites OTHER JS file to HTML directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.js$ /HTML/$1.js [L]

#Rewites PHP file to PHP directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.php$ /PHP/$1.php [L]

#All other files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)$ /PHP/transform.php?page=$1 [L]

There are several .htaccess syntax checkers available on the Internet. I would recommend trying one of those on your code to see if it is working as intended.
Go to the top of the page
 
+Quote Post
freelife
post May 1 2012, 04:31 AM
Post #6





Group: Verified NS Member
Posts: 4
Joined: 3-July 11
Member No.: 14,628



Hi Craig

I have testet this and should be okay.
I requested MyTime support, but they could not help me with this issue. answer from MyTime "we are unable to complete your request because we are not familiar with the particular coding errors you have indicated"

I have search regarding this error and it looks to like NS have a problem! I hope someone can guide me in direction to solve this problem or suggest an alternative web host ?
Thanks
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version    Network Solutions © 2011 Time is now: 29th July 2014 - 05:34 PM
Domain Names | Web Hosting | Web Design | Shopping Cart Software | Online Marketing | SSL Certificates