Apache :: Removing PHP For One File Only In HTAccess

Jun 11, 2014

I'd like to change /comp.php to /comp but I have only found articles on how to remove .php completely and I don't want to do that, only want to do it for this one file.

View 5 Replies


ADVERTISEMENT

Apache :: Removing File Extensions With RewriteEngine Doesn't Work

May 7, 2015

I'm trying to accomplish a rather common task of removing file extensions, where say, instead of index.php, just index can be accessed.

I've gone through many tutorials that offer all sorts of different ways how this can be accomplished and none of it works but what's commonly given is something like this.

View 4 Replies View Related

Apache :: What Is HTAccess File

Jan 31, 2013

what is .htaccess file? use of this file?

View 6 Replies View Related

Apache :: How To Redirect To Different File In HTAccess

Jan 27, 2013

So, I would like my htaccess file to check if a file exists and if it doesn't then redirect to another file. How would I go about doing this?

View 5 Replies View Related

Apache :: Write HTAccess File For A 301

Apr 15, 2013

I have learned some bits of regular expressions for simple scripting, writing a .htaccess file is, uh, syntaxically daunting.

THE CASE :

The URLs of my site used to be of the form [URL] ... . They are now of the form [URL]......

I am trying to perma-redirect (301) the old format (affiche_fiche.php) to the new format (fiche.php) using a .htaccess.

So far all I have achieved is a hatred of punctuation signs. What's the correct syntax to have a .htaccess that does the redirect ?

THE CONTEXT : The format change took place more than six months ago, but the Google Webmaster Tools still spits 450 problems a day with 404s on URLs using the old format. I had assumed that these would just fade away, but they don't. So I guess that 301'ing them is cleaner. Or would be, if I understood the syntax.

View 7 Replies View Related

Apache :: HTAccess File Is Not Working?

Feb 20, 2014

I want to upload the custom 404 error page and .htaccess file to my website but .htaccess is not working on my web server. I have use the correct file name and try it many time but no result I have found. My web server is Microsoft IIS 7.5

View 2 Replies View Related

Apache :: Can Have HTAccess File Which Create Links

Mar 16, 2013

In my personal website at URL.... I have the top like 'index.php?pg=profile', 'index.php?pg=home' or 'index.php' (without any querystring), 'index.php?pg=diary' etc. I am looking to see if I can have .htaccess file which can make me create links like

index.php/
index.php
index.php/home
index.php/profile
index.php/diary

write an .htaccess for the same?

View 1 Replies View Related

Apache :: How To Deny Access To Specific File Using HTAccess

Jun 21, 2014

I would like to deny access to .log

View 1 Replies View Related

Apache :: How To Select Specific File With Path Using HTAccess

Jun 14, 2014

I want to select a specific file by its path using .htaccess to allow access to it.

View 1 Replies View Related

Apache :: HTAccess File Included In Project - Stuck With 403 Error

Oct 8, 2012

I was trying to set up archive-my-tweets [URL] .... and I seem to have gotten stuck with a 403 error. When I remove the .htaccess file the 403 goes away but so do the rewrite rules so that's a problem.

You'll see the contained .htaccess file that's included in the project.

Basically for now I'm just trying to run this on my mac. I have set up the files in a subdirectory of my personal web server. The personal web server is working fine--but when I go to the /tweets directory I get the 403.

View 8 Replies View Related

Apache :: Will Editing HTAccess File In Cpanel Effect All Wordpress Domains And Subdomains

Mar 26, 2014

I added the following to my cpanel .htaccess file on my hosting account:

<FilesMatch ".pdf$">header set x-robots-tag: noindex
</FilesMatch>

This was to stop Google from crawling and indexing my PDFs, will this work accross all my addon domains and subdomains (which are wordpress) on my hosting account or do I need to take extra measure?

View 4 Replies View Related

Removing File -bash: /bin/rm

Mar 31, 2007

Sometimes if I tried to use rm to remove too many files I got this:

-bash: /bin/rm: Argument list too long

I think there was a workaround, like ls and then piping the result to rm, but I forget.

View 3 Replies View Related

Plesk 11.x / Windows :: Prevent Removing Files On File Manager

Jun 4, 2014

How Can I prevent users removing file web.config on FileManager?

I try set attribute read-only, but not effect.

View 4 Replies View Related

Removing Apache Modules

Apr 17, 2009

I have a RHEL 5 server, that host one site with a common PHP 5.x -MySQL 5.x app, it also uses .htaccess to rewrite rules. I'm trying to optimize apache to the max, and though about removing some unneccesary modules. The actual modules loaded are:

Code:
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule evasive20_module /usr/lib/httpd/modules/mod_evasive20.so
LoadModule security_module /usr/lib/httpd/modules/mod_security.so
Besides of mod_evasive, mod_security that are security modules, what modules can I disable without causing any problems to a common PHP-MySQL website?

This is a plain RH box, virtual host is configured at httpd.conf in this way:

Code:
<VirtualHost SERVERIP>
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /var/www/sites/mysite.com
<Directory "/var/www/sites/mysite.com">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</VirtualHost>

View 4 Replies View Related

Apache :: Removing Www And PHP Not Working

Dec 10, 2013

So I insert following code in my apache.htaccess file in order to remove www and php.This is my whole file

ErrorDocument 500 /500.phpErrorDocument 404 /404.php# force non-www domainRewriteCond %{HTTP_HOST} ^www.example.com$ [NC]RewriteRule (.*) http://example.com/$1 [R=301,L]#RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ $1.php [QSA,L]

View 1 Replies View Related

.htaccess~ File

Oct 4, 2008

There is a .htaccess~ file in the root directory of my server. .htaccess is also in that place. But what is the purpose of that .htaccess~ file?

View 3 Replies View Related

Htaccess File Not Working

Sep 11, 2006

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 0 Replies View Related

Htaccess File Size

Oct 25, 2009

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 7 Replies View Related

Php.ini And .htaccess File Permissions

Aug 17, 2008

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 3 Replies View Related

Htaccess Redirect (from A File With Spaces)

Nov 26, 2006

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 6 Replies View Related

Upload A .htaccess File In FTP And It Disappears

Feb 11, 2008

I upload a .htaccess file in FTP and it disappears, i checked with SHELL file is there but cant see in ftp ,

View 2 Replies View Related

Use Htaccess File To Disable Downloading Of Anything In The Directory

Aug 10, 2008

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 3 Replies View Related

Use .htaccess File To Allow Access To Zip Files Only From My Script

Feb 18, 2007

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 3 Replies View Related

How To Use Wget Command To Download .htaccess File

Jul 1, 2008

I just want to use wget command to transfer data from a shared host to dedicated server.Anybody knows how to set wget to download the .htaccess file and keep the file/directory's permission the same as they used to be on the old server?
I only knows these:wget -b -c -r -l0 -np -nH -t0

View 5 Replies View Related

Pcfg_openfile: Unable To Check Htaccess File, Ensure It Is Readable

Apr 16, 2008

Apache error log for a subdomain

[Thu Apr 17 00:02:24 2008] [crit] [client 69.113.17.156] (13)Permission denied: /home/user/public_html/subdir/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

However, there is no htaccess file in that directory anyway

/home/user/public_html/subdir

Server is Centos 5 / Cpanel

View 5 Replies View Related

.htaccess Issue With Apache 1.3, But Works On Apache 2.2

Mar 22, 2008

I have the following Apache redirect code in .htaccess:

RewriteRule ^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$ /domain.com/app/modules/content/latestNews.php?id=$1 [L]

This redirect works fine on Apache 2.2.8, but doesn't work on Apache 1.3.41

The following is the entry from error_log:
RewriteRule: cannot compile regular expression '^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$'

A simple Rewrite is working fine in Apache 1.3, but the above regualar expression doesn't seem to be working on Apache 1.3. Does anyone know whether Apache 1.3 doesn't support it?

View 3 Replies View Related

Apache :: How To Discover Which Php File Allows Malicious File Upload

Oct 10, 2014

i manage linux apache webserver with a few wordpress blogs and from time to time i see someone inject a malicious .php file into wp-content/uploads/2014/10/ directory.

i think its some bad plugin or theme, but these is more blogs, i ugrade, update, WP, but

how can i setup some monitor to tell me which php file (or even line in php file) injected that malicious .php ? I have linux root access so i can setup anything 

View 3 Replies View Related

Set Apache Handler Through .htaccess - Possible?

Jun 2, 2007

I am running into a bit of a problem. Previously, I can add an apache handler through cPanel easily... but now I moved to mediatemplate.net and that feature isn't available on their contol panel. Since they also run apache, I figured that I can set the apache handler manually through an .htaccess file - is that possible? If so, what is the syntax that will enable me to set .html files to be handled like .php files?

There is one setback to this process - this will be a manually inserted file for every directory that I want to do the above stated file handler. Is there an easier way to do this via SSH? I don't have root access, only normal user access.

View 3 Replies View Related

How Enable Htaccess On Apache?

Jun 2, 2009

Hi Htaccess not working in my server how Enable htaccess on Apache ?

View 14 Replies View Related

Htaccess Not Work On Apache

Nov 3, 2009

im installing APACHe on windows server 2003 but .htacess not work on apache

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved