timmy0320 Posted April 14, 2008 Share Posted April 14, 2008 I contacted my host but maybe i can get a quicker response on here who knows. This works locally on my personal server but does not work right on my host maybe one of you knows why this is ########## NO INDEX VIEWS ALLOWED Options -Indexes Options +FollowSymLinks ########## DENY ACCESS TO .HTACCESS <Files ".ht*"> Deny From All </Files> #ErrorDocument 404 /notfound/ ########## REWRITE ENGINE ON RewriteEngine on RewriteBase / ########## REDIRECT TO MYDOMAIN.COM RewriteCond %{HTTP_HOST} . RewriteCond %{HTTP_HOST} !^mydomain\.com [NC] RewriteRule (.*) http://mydomain.com/$1 [R=301,L] ########## IGNORE DIRECTORIES RewriteRule ^images(/.*)?$ - [L] RewriteRule ^css(/.*)?$ - [L] ########## REDIRECT FILES TO INDEX.PHP RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) - [PT,L] RewriteRule ^(.*) index.php [R=301,L] When I go to my site mydomain.com/ my PHP script then explodes the '/' value into an array. For some reason when I put the .htaccess file on my host it doesn't work properly because it is sending me to mydomain.com/index.php in the URL itself (it does not do this on my local machine) instead of just leaving it as is so in turn I get an error not found (index.php) because it is not in my scripts array. Any help is appreciated. Link to comment https://forums.phpfreaks.com/topic/101028-solved-works-locally-but-not-on-host/ Share on other sites More sharing options...
timmy0320 Posted April 14, 2008 Author Share Posted April 14, 2008 Nevermind, fixed it. Removed the [R=301,L] after it and worked like a charm. Link to comment https://forums.phpfreaks.com/topic/101028-solved-works-locally-but-not-on-host/#findComment-516612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.