This is my first post here ever, I hope I don't make a mess. Please help me with this htaccess problem. I'll try to explain: I was asked by my script vendor to put the .htaccess within my script directory. Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php?/$1 [L] RewriteRule ^$ /index.php [L] RewriteCond $1 !^(index\.php|install|img|images|scripts|fonts|uploads|css|js|robots\.txt|sitemap\.xml|favicon\.ico) RewriteRule (.*)-(.*)\.html$ wallpapers/show/$2 RewriteRule (.*)-(.*)/$ categories/show/$2 Code (markup): As you can see the above code is for base directory i.e. the main site, and my script lies in a sub-directory i.e. " /test/ ". after uploading the above htaccess i was getting 404 errors but i changed the htaccess to this : Options +FollowSymLinks RewriteEngine On RewriteBase /test RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) /test/index.php?/$1 [L] RewriteRule ^$ /test/index.php [L] RewriteCond $1 !^(index\.php|install|img|images|scripts|fonts|uploads|css|js|robots\.txt|sitemap\.xml|favicon\.ico) RewriteRule (.*)-(.*)\.html$ wallpapers/show/$2 RewriteRule (.*)-(.*)/$ categories/show/$2 Code (markup): But Now I am facing a new problem, few of the links are working and few are not. My links without htaccess looks like this. http://www.*****.com/test/index.php?/members http://www.*****.com/test/index.php?/contact http://www.*****.com/test/index.php?/categories/show/1 http://www.*****.com/test/index.php?/wallpapers/show/1 After .htaccess enabled my above links look like this with working and not-working: http://www.*****.com/test/members (Working) http://www.*****.com/test/contact (Working) http://www.*****.com/test/3D-1/ (Not working 404 error) http://www.*****.com/test/Blue_Hills-1.html (Not working 404 error) Please help as my vendor is no more available. What changes should I make to the above code? I think I am missing something relating to subdirectory
I have the .htaccess placed in the /test folder. I have also tried it by installing the whole script outside the sub-directory and in the main directory but still the problem is same. I should add that I am on a Shared Godaddy server. I am telling because going through many other posts relating to htaccess in this forum I found out that godaddy handles htaccess in a different way.