Htaccess File Not Working
I'm wondering why sometimes my htaccess files don't seem to work, especially when contained within subdirectories. I've got two problematic situations:
(1) I've got a mod rewrite that supposedly works. I put it in a subdirectory like /dbase/stuff/ but the script ignores it like it just isn't there. Permissions don't change anything and they are currently set to 644. It's very simple and only contains the following code: ....
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Htaccess File Size
I manage a high traffic website on one of my dedicated servers. It currently serves around 2 million uniques/mo. In time, due to page changes, around 200 important URIs got a redirect [L,R=301] in the main .htaccess file that's sitting on the root directory. Redirects are in the form of : person/J/James_Blake_2000/ --> /user/James_Blake/ Thus, the .htaccess file has reached well above 200 lines. I would like to kindly ask for advice: should I limit the dimension of this htaccess file ? How do you guys treat these permanent redirects?
View Replies!
View Related
Htaccess Redirect (from A File With Spaces)
I'm trying to redirect from a filename that contains spaces using .htaccess for example, I want to redirect /test 2.html to http://example.com I've tried: ReDirect /test 2.html http://example.com ReDirect /test 2.html http://example.com ReDirect /"test 2".html http://example.com ReDirect /'test 2'.html http://example.com ReDirect /test%202.html http://example.com ReDirect /"test 2.html" http://example.com ReDirect /'test 2.html' http://example.com And a few others. I can't seem to get the syntax right, and always end up getting an internal server error message. Anyone have any ideas?
View Replies!
View Related
Use Htaccess File To Disable Downloading Of Anything In The Directory
I am using a flash media player on one of my domains that streams music. The flash player would be like domain.com/music The mp3 files are located in domain.com/music/mp3 The flash player just reads the title of the song and displays it in the media player. I have used htaccess already to disable indexing, but the file name that shows on the media player is the exact name of the mp3, so I'm pretty sure people will be able to easily figure this out and start downloading our music. What else can I add to htaccess to allow localhost access to the music, to stream with the flash player, but wont allow downloading of the mp3s.
View Replies!
View Related
Php.ini And .htaccess File Permissions
I'm on a shared FreeBSD server, running Apache with Drupal, and vBulletin. I had to create a local php.ini file in my public_html folder for Drupal, and another in my forum folder for vBulletin. Now my question is, what should I set the permissions of these files to? Also, what should I set .htaccess permissions to as well? I'd like to keep them invisible to the public. But, I don't want any problems with Drupal, or vBulletin ether. I'm used to using Linux and I know how permissions work on a desktop. I just don't know what they do when used on a server. I'm guessing 640, but I'd like to make sure before I change anything.
View Replies!
View Related
Use .htaccess File To Allow Access To Zip Files Only From My Script
I have download manager script that I use for my customers to download products right after the purchase. Script generates download link that looks like this: http://www.yourwebsite.com/download/...582921B&p=1840 (where 2YY6582921B is receipt number that is different with each purchase). All products are placed in one folder. This folder can not be seen in above download url, but can be accessed thru browser and files can be downloaded that way without paying for them. Can I use .htaccess and if yes how, to protect all product files the way that they can not be accessed directly by visiting url thru browser (in case somebody will find the correct url), they should be allowed for access only for my download manager script.
View Replies!
View Related
IIS File Refresh Is Not Working
This post is a repeat of a 13-month old thread [url] that had no resolution. I am hoping that someone can comment on it as I am having the same exact issue. Environment: IIS web server running windows server 2003 (runs both production and development. Issue: When updating the CSS and then viewing the pagein a browser, changes are NOT being reflected. Troubleshooting: Replaced file = No changes Emptied Cache (IE, Firefox and Netscape) with Ctrl 5, closed browser window, opened new browser widow = No changes Emptied Cache (IE) with Tools> Internet Options >, closed browser window, opened new browser widow = No changes Checked 2 other machines (PC and Mac) = No changes Checked multible browsers (IE6, IE7, Safari, Firefox) Deleted file = No changes (still renders old styles even with no stylesheet on server) Re-starting the IIS website is obviously not suitable for development (but does work). Our IT guy said that I had to wait two minutes between loading a file and checking the website- and that no one else could hit that page in the meanwhile. Again, obviously not suitable for development.
View Replies!
View Related
Non-working Forwarding Email Account On Working Domain
I have a domain with a few forwarding email accounts that forward to mac.com email accounts... for some reason every once in a while these accounts stop working... This is the error I get when I email to that account: This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: ...
View Replies!
View Related
Ffmpeg :: Cannot Open Shared Object File: No Such File Or Directory In Unknown On Line 0
Rapidly growing error logs showing the same message $ug-non-zts-20020429/ffmpeg.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20020429//usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0 root@server [~]# ls /usr/local/lib/php/extensions/no-debug-non-zts-20020429 ./ ../ eaccelerator.so* root@server [~]# ls /usr/local/lib/php/extensions/no-debug-non-zts-20020429 ./ ../ eaccelerator.so* Using cpanel 11 / centos 4
View Replies!
View Related
Links Files In Linux (file.txt For File.php)
Today I found some cstomer on the servers make a link for named it file.txt and link it to other customer php file. so that customer have the ability to show the other custoer file content when visiting the url because it is a text wile originally it is a php file. the php file was a config file, so now he know the database password , and because he is in the same server he can use that databse. the question , how to avoide this prolem in the future? notes , the SuExec is rnning and the open_basedir protection is enabled, but the problem still exists.
View Replies!
View Related
.htaccess
I have a vds with godaddy. I uploaded my site and then uploaded .htaccess (AddHandler server-parsed .html) Then when I go to my site in browser I get this error. Safari can’t open the page “mydomain”. The error was: “lost network connection” (NSURLErrorDomain:-1005) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message. The thing is, I did the exact same thing on another domain with the same htaccess file and everything works fine. SSI is enabled on both.
View Replies!
View Related
.htaccess
I'm currently having a problem with a site of mine. The problem is that trying to go to domain.com/subdirectory/ (with or without the trailing slash) gets a 404 error (even though the directory exists). However, domain.com/subdirectory/file.php works fine. When trying to figure out what is causing this, I remembered that someone who recently did some work on this site had to add something to the .htaccess file. Here's what they added: RewriteCond $1 !.(php|ico|gif|jpg|png|css|js|htm|html|txt|zip|pdf)$ RewriteCond $1 !^$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [L] I haven't done much with .htaccess, so I really have little idea what any of the above means or does (although I know it does something important). So I guess my question is, could this bit of code be causing my problem? And, if so, how can it be corrected without messing up what this code was put there for in the first place?
View Replies!
View Related
Htaccess
Code: RewriteCond %{QUERY_STRING} ^showtopic=([^&]+)&st=0$ RewriteRule ^forum/index.php$ [url] I get a 500 Internal Server Error when I put that in my .htaccess file. Got it from [url]
View Replies!
View Related
.htaccess
htaccess file that will redirect all requests for the domain to -- https://www. so what I want is all traffic to be secure and use the 'www'.
View Replies!
View Related
*.* And .htaccess
If I do rm -f *.* I see that .htaccess is not deleted If I do copy -f *.* /somedir .htaccess is not copied. Why? What should I do to represent all files including .htaccess?
View Replies!
View Related
.htaccess
i have a mobile download site.. now i dont want users to directly download from my site.. i mean hotlinking.. I hav a referal thing in my .htaccess RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC] Now there is a flashget like software for mobiles.. i want that my users are able to download using that software but the prob is that soft doesnt sends any referal info.. so in my .htaccess i want to allow that software and i am trying this RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ^.*FGet 1.0.*$ [NC] RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC] RewriteRule .*.(zip|avi)$ - [F,NC] where FGet 1.0 is the HTTP_USER_AGENT send by the software, but this doesnt works.. can plz give me the right code for it
View Replies!
View Related
Htaccess
I'm have a bit of a mare getting some htaccess to work. Here's my code: Code: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-F RewriteRule ^([-_!*$@~:.a-zA-Z0-9]+)$ [url] The above works on a CPanel server but i've just moved the site to a fedora core 6, with standard httpd no control panel. This is an entry from my log files: PHP Code: X.X.X.X [28/Sep/2007:11:51:34 +0100] "GET /my_profile.php?username=my_profile.php HTTP/1.1" 302 349 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)" For some reason it appends the my_profile.php to the end of the url, and it does it to any file in the same directory and just keeps going around in a loop, why would it do this?
View Replies!
View Related
Htaccess- Redirecting
I'm trying to redirect all people who go to [url]to [url] I've got this but it doesn't do anything: (and I did verify that the .htaccess works, as I added garbage text and tested and got an error). Code: Options +Indexes RewriteEngine On RewriteCond %{HTTP_HOST} ^www.mydomain.com/directory/$ [NC] RewriteRule ^(.*)$ [url]
View Replies!
View Related
.htaccess With ISAPI_Rewrite
I have just found out my server only supports .htaccess with ISAPI_Rewrite. Not quite sure how to accomplish this as in the past I just used normal .htaccess code. I just want to do a simple redirect so could anyone shed a bit of light on what I now need to pop in the file.
View Replies!
View Related
.htaccess From Old To New Site ...
I'm trying to learn htaccess, but I'm having issues wrapping my head around this. I need to learn by example. Have several types of 301 permanent redirects that are needed. Want to redirect a single page to a new page OLD - [url] NEW - [url] Want to redirect a folder, AND any pages in it (preferably without naming EACH page), to a new folder's index OLD - [url] NEW - [url] Want to redirect a subdomain to the primary domain OLD - [url] NEW - [url] Want to redirect a folder, AND any pages in it, to a new subdomain OLD - [url] NEW - [url] Using ISAPI_Rewrite 3 on 2003/IIS6, which uses htaccess commands. Could anybody here show me what they would do in these scenarios? I've read and read, and tried and tried, but it never seems to work out correctly. It either fails to redirect, or it redirects too much (some "open" type commands with a lot of variables will pick up the keyword -- for example, "students" -- so students.domain.com AND domain.com/students AND domain.com/program/students.html would all redirect, even though I only wanted the subdomain version, or the page version, to redirect, and not the others!).
View Replies!
View Related
.htaccess On IIS
I am using a script, on which i want to enable friendly URL, below are the instructions. Friendly URLs Settings Apache Settings (please add the following lines to your .htaccess file to turn on friendly URLs) <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /hcl/friendly_url.php [L] </IfModule> But, issue is, i am using IIS on Windows Server. How can i implement this?
View Replies!
View Related
.htaccess Redirect
I know how to do a redirect to a new URL using a .htaccess file if I am pointing to a different server, however both domain.com and domain.com.cn are pointing to the same server, I just am wondering what I would add into my .htaccess file to get it to redirect from domain.com.cn to domain.com?
View Replies!
View Related
.htaccess Subdomains
to have abc.mydomain.com redirect to mydomain.com/abc to do this, I have: 1) created a DNS record at my hosting company, *.mydomain.com and it works, any made-up subdomain correctly points to my server. 2) using Plesk, I created a DNS record, *.mydomain.com 3) in an .htaccess file, I put: RewriteEngine On RewriteCond %{HTTP_HOST} !^www.mydomain.com RewriteCond %{HTTP_HOST} ([^.]+).mydomain.com [NC] RewriteRule ^(.*)$ http://www.mydomain.com/%1 [L,R] ... but the thing doesn't work, I keep getting the server's default page: This is the Control Panel default page If you see this page it means: 1) hosting for this domain is not configured or 2) there's no such domain registered in Control Panel.
View Replies!
View Related
.htaccess Mod_rewrite
I'm trying to redirect everything except the subdomains from an old domain to a new domain. The following appears to work so far: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} !^sub1.olddomain.com$ [NC] RewriteCond %{HTTP_HOST} !^sub2.olddomain.com$ [NC] RewriteCond %{HTTP_HOST} !^sub3.olddomain.com$ [NC] RewriteCond %{HTTP_HOST} !^sub4.olddomain.com$ [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L] But the subdomains also seem to be loading rather slow. Am I doing anything wrong here? Is there any way to optimise or simplify this (I have around 11 subdomains on the old domain)?
View Replies!
View Related
.htaccess And Folders
In the public_html directory, I have php_value user_agent "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" <IfModule mod_security.c> SecFilterScanPost </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / Errordocument 404 /404.html RewriteCond %{REQUEST_FILENAME} !.(jpg|jpeg|gif|png|css|js)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php [L] </IfModule> Then I created a new directory named caller There is an exact same .htaccess in public_html/caller However, the .htaccess in the public_html directory rewrites all request to index.php .htaccess in public_html/caller rewrites all request to /caller/index.htm The thing is when I access [url] whatever the one that's called is /public_html/index.php How can I arrange so that the one called is /caller/index.htm?
View Replies!
View Related
Redirecting......(htaccess)
I have been trying for more than an hour to figure that out , but nothing.... I want to perform 2 types of redirects on my webpage/forum I want all non-www to move to www.mysite.com/forums and I also want the www.mysite.com to redirect to the /forums one... All of those with WWW I can make each work alone, but not these 2 together....
View Replies!
View Related
Enable ,htaccess
i disabled the .htaccess files when i installed the modsecurity with the following command /usr/local/apache/bin/apxs -D DISABLE_HTACCESS_CONFIG -cia mod_security.c now how can i recompile the modsecurity with .htaccess enabled?
View Replies!
View Related
.htaccess Referrer Allow
I want to allow all websites the ability to display in-line one specific image from my website. At the moment i'm using the following code: SetEnvIfNoCase Referer "^" local_ref=1 SetEnvIfNoCase Referer "^http://www.pvkii.com/" local_ref=1 SetEnvIfNoCase Referer "^http://www.insectsinfestation.com/" local_ref=1 <FilesMatch "gu_button1.gif"> Order Allow,Deny Allow from env=local_ref </FilesMatch> I want to make this so that all websites, not only ones that i specify can access only that graphic. Can i do that?
View Replies!
View Related
Htaccess RewriteRule
I am setting a new site, right now using: Code: RewriteRule ^([0-9]+)-(.*)$ /dir1/file.php?x=$1&y=$2 [QSA,L] So the address [url]is in access as [url] Is it possible to somehow remove "-" in rewrite code, as the first variable is always 4 digits?
View Replies!
View Related
Htaccess Rewrite
When someone types in myforum.com/forums.html I want it to display the main forum (myforum.com) with ...../forums.html in the url bar. But without actually having a forums.html file present on the server. Can this be accomplished with htaccess?
View Replies!
View Related
Htaccess Files..
I have a directory on my web server that should not be accessible by default, the files in here are being included by php files outside the directory.. so quite simply, I need to protect the directory. Now I don't want to protect it with a login, that's simply not needed, the directory and all the files in it should simply be inaccessible.. I don't know a whole lot about htaccess though, can anyone here tell me what to put in the .htaccess files to simply deny all access to the directory and if possible display a specific error message.
View Replies!
View Related
Suhosin And .htaccess
I just installed suhosin to setup some limits on one of my servers, everything works well. however, user can still remove these limits by adding php_value in .htaccess, which is not so good.
View Replies!
View Related
Changing .htaccess
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule !^index.php$ index.php [L] </IfModule> Hi, This is my current .htaccess As you see, it redirect all pages to index.php except index.php itsel How do I modify it so that the exception is not just index.php but also channel.php or index3.php?
View Replies!
View Related
Htaccess Block Spammers
On my domain access logs, I see a spammer using many different IPs to join my top site list with fake emails. At the end of every line, it contains I am SPAMER! How can I configure htaccess to block this spammer when a request contains that text?
View Replies!
View Related
Record .htaccess Logins?
I have a site that has a members section requiring members to log in with a username/password through .htaccess & .htpasswd file. Just wondering, is there a way I can record their logins and ip addresses using PHP scripts or .htaccess? I just want to keep track of the logins so I can see which login is being abused and keeping track of them.
View Replies!
View Related
|