Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
129 views

How to ensure apache2 reads htaccess for custom expiry?

I have a site with Apache 2.2.22 . I have enabled the mod-expires and mod-headers modules seemingly correctly: $ apachectl -t -D DUMP_MODULES … expires_module (shared) headers_module (shared) … ...
1
vote
1answer
288 views

google chrome : http authentication issue on iframe

I have an HTML file with 2 links both links are in an iframe to load the contents inside the iframe. I have two protected directories one on the same server and other on another server. If you click ...
2
votes
2answers
276 views

Send 404 Status Code on www.example.com

Does anyone know if it's at all possible (preferably with .htaccess), to send a 404 error code and page when visiting http://www.example.com but have http://example.com working just fine? I want to ...
2
votes
1answer
818 views

Remove multiple trailing slashes in a single 301 in .htaccess?

There is a similar question here, but the solution does not work in Apache for our site. I'm trying to remove multiple trailing slashes from URLs on our site. I found some .htaccess code that seems ...
1
vote
2answers
1k views

Rewrite in Mediawiki, remove index.php, .htaccess

I've just installed Mediawiki on Apache and I want the URL should be: localhost/Main_Page/ localhost/Special:Recent_Changes ... instead of: localhost/index.php/Main_Page/ ...
1
vote
1answer
148 views

Google Indexing Issue after htaccess changes

I have a site called www.FuneralCoverFinder.co.za. I have about 30 pages on the site and usually have 29 indexed. (Excluding 15 blog posts) They are new. I recently upgraded my entire site and made ...
2
votes
1answer
318 views

Seeking .htaccess help: Converting multiple subdomains (both HTTP and HTTPS) to www.domain.com using .htaccess

I've been trying to get an answer to this question on other forums (the folks at SuperUser thought this was the place I needed to post) and via my connections, but I haven't gotten very far. Hopefully ...
2
votes
1answer
711 views

How to redirect requests to another folder using .htaccess?

How to redirect requests to another folder using .htaccess? I have my root directory and my website looks into that directory. I want it to look in the /subdirectory/ instead. I can't modify the ...
3
votes
1answer
216 views

How can I redirect all files in a directory that doesn't conform to a certain filename structure?

I have a website where a previous developer had updated several webpages. The issue is that the developer had made each new webpage with new filenames, and deleted the old filenames. I've worked with ...
3
votes
1answer
205 views

Subdomain In Addon Domain Is Not Working

I added a new addon domain to my cPanel hosting. With the new added addon domain, I try to make some subdomain of it. But, the subdomain is not working like subfolder does. This is my situation: ...
3
votes
1answer
168 views

Stop Apache serving filetypes

Preferably using .htaccess files, though .conf files are an option, is there any way to stop Apache serving certain filetypes? For example, .db shouldn't be served for obvious reason (privacy and ...
5
votes
1answer
639 views

How can redirect pages from old core PHP site to new Joomla site?

We have our old site into core PHP and we have developed it again into Joomla 1.5 last year (because of some limitations we have to build it into 1.5). Now the problem is the URL of sites changed as ...
1
vote
3answers
6k views

How do I do URL re-writes on Plesk?

I am very new to URL re-writing and I am using Plesk which is window-based web server, hence I can't use Apache's mod_Rewrite. Can anyone tell me what is the proper procedure for this?
1
vote
2answers
287 views

How do I redirect www and non but not IP

I am trying to redirect www.domain.com or domain.com to www.domain.com/temp.html I am using the following code: RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^/?$ ...
5
votes
1answer
662 views

URL masking with .htaccess

I need a hardcore programmer to help me with URL masking. So this is my situation. My website www.michaelfotograf.dk/blog/ is the main site that needs to be configured. I have another ...
2
votes
1answer
251 views

How to hide download file from bots? [duplicate]

Possible Duplicate: How to restrict the download of all files in a folder? I want to make a private file available for download but not use username/password protection. I want to put the ...
1
vote
1answer
180 views

Is it possible to use two different ErrorDocuments for different paths of a website?

I currently run PmWiki at mydomain.com/pmwiki. I have a 404 page and .htaccess set up in my site's document root for 404 pages regarding anything that doesn't have to do with my wiki. By default, ...
0
votes
0answers
206 views

SIMPLEST way to set up password protection for a static site, with basic admin UI?

I have a static site. I would like the simplest approach to password protecting a directory, with a basic admin UI for adding/removing users. I will have so few users that I don't care about ...
7
votes
3answers
258 views

How to re-direct Wordpress posts with 301

All my WordPress post URLs generate sub directories with duplicate content and I do not know what regular expression to use to consistently 301 redirect domain.com/category/post/random-number/ to ...
7
votes
1answer
314 views

home page of my site is not appear in google search, when I type site:example.com

I am totally confused, when I place site:example.com in google I see every page of my website in serp(search engine result page) except the home page. I don’t know why it’s happening but I check ...
2
votes
1answer
146 views

How to track a cronjob running on my site?

I have an old Joomla 1.5 site hosted on a shared Bluehost server. Recently my .htaccess files are being rewritten every 10 minutes, and the site has been black listed. It looks like some php cronjob. ...
2
votes
1answer
372 views

Need a generic way to create SEO friendly URL

I have searched a lot and implemented many many Regular Expression in my .htaccess file but can not succeed. How do I find a generic way that make my URL SEO friendly? Currently this is in my ...
5
votes
2answers
810 views

.htaccess two different rules but only one per time

I'm rather new to the whole .htaccess thing and I'm using the following right now to use 'pretty url's': <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d ...
1
vote
1answer
141 views

Apache URL Rewrite

I'm trying and failing to get a URL rewrite working, firstly I'm doing it in the vhost declaration, is that right? What I'm trying to do is take any URL which has; view.php?id=[a 1 or multidigit ...
3
votes
1answer
151 views

URL hex characters in .htaccess

There is an old page with a space in the filename, and this is no longer found on the website. So I need to redirect this page to another page using a 301 redirect in .htaccess. If I place the ...
3
votes
1answer
680 views

Wild card redirect in htaccess giving error this webpage has a redirect loop

In my website I changed the directory name "vehicles-cars" to "vehicles-cars-for-sale". When I tried to redirect using a wild card redirect from my old directory name to new directory name in my web ...
4
votes
1answer
721 views

Password protect an alias virtual directory

I have a main domain being hosted through CPanel. I also have a sub-domain that I would like to appear as a path under the main domain instead of as a sub-domain. So I have: http://example.com/ ...
2
votes
1answer
667 views

.htaccess 301 Redirect for wildcard subdomains

I run WordPress in Network mode, which means I can have multiple websites running off one installation of WordPress. Each website runs as a subdomain. WordPress handles this using .htaccess, and a ...
3
votes
1answer
511 views

Disallow all user agents except one using .htaccess?

I've been struggling to get this .htaccess working. The aim is to disallow all user agents besides my app. The app sends a GET request with a user agent of lets say 'AcmeUpdater'. Whenever I try to ...
1
vote
1answer
407 views

RedirectMatch in .htaccess not working

I am using Transposh plugin to make my site 'bilingual'. Unfortunately, despite having English as the default language and therefore available at carolineelisa.com/xxx, Google is indexing ...
0
votes
1answer
1k views

.htaccess non-www to www rule seems to work but the URL isn't changing in the address bar

On a joomla site, apache, shared hosting, I'm using next .htaccess rule: RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] The problem is that the browser's ...
1
vote
1answer
282 views

Limited 301 Redirect performance in .htaccess?

I'm in a situation and haven't been able to find a proper solution after much research. I'm working with a client who just built a new website with a different URL structure. After the website was ...
2
votes
1answer
2k views

Help with 301 redirect from subdomain to root domain

I need to forward existing subdomain links to the root domain as the subdomain no longer exists. I have tried so many different lines of code in my .htaccess file and can not get the redirect to work. ...
1
vote
0answers
312 views

404 error on a file/directory that exists?

We are using the vBulletin system. I have set it up so that it redirects 404 error's to a php page, so it follows the theme of the forum. However, if I go to a directory that exists (the admin ...
0
votes
1answer
74 views

rewrite url for articles with htaccess

I've had a look through several other questions to see if i could get this working but have had no success at all at the moment so i'm hoping someone can help. This is the url i currently have, ...
1
vote
1answer
255 views

.htaccess Forward all mail subdomains to /webmail/

I would like to write a .htaccess rewrite command that takes any url with a subdomain mail and forwards them to whatever domain included that subdomain with /webmail at the end. e.g. mail.zane.com ...
0
votes
1answer
304 views

How to silently auto-load from a subdirectory, but allow internal paths to think the file is located at site root?

I have files in my site root, and also files in its "Iternet_IE" directory. I need to: 1.) be able to call/include other files (e.g. headers or footers) from within files at either of those ...
1
vote
1answer
326 views

conditional DirectoryIndex based on IP address, using .htaccess

I've got this in httpd.conf: <VirtualHost xx.xxx.xx.xxx> Options All +ExecCGI ServerAdmin hostmaster@thehost.com DocumentRoot /var/www/html/domain.com ServerName dl.domain.org ...
2
votes
2answers
4k views

How can I fix the #c3284d# malvertising hack on my website?

For the past couple of weeks at semi regular intervals, this website has had the #c3284d# malware code inserted into some of its .php files. Also the .htaccess file had its equivelant code inserted. I ...
1
vote
2answers
4k views

Best practice for adding the www subdomain: Via an A record or htaccess redirect?

Having used both methods in the past I just wandered which method is actually best practice when handling the www subdomain? Do I setup another A record in the DNS to point to the same IP ad the root ...
0
votes
1answer
154 views

htaccess Rewrite Syntax?

I have a bunch of files with a "NEW-" prefix (e.g. "NEW-index.php"). I need to do a 301 redirect to the corresponding file without the prefix. I've tried a few things but I'm not getting the regex ...
1
vote
1answer
174 views

if i change the cname of my site to point to tumblr will any .htaccess file i upload to the root be over ridden?

If i upload a .htaccess file to the root of my domain but then point the domains cname at tumblr will the contents of the .htaccess file be over ridden by tumblrs htacess file ?
1
vote
1answer
200 views

Prevent .htaccess 301 redirects on subdomain

I have 301 redirects which direct /index.html to /site folder and when I created a subdomain it also redirects the link to /site which causes 404 Not Found. For example: members.mysite.com redirects ...
1
vote
0answers
462 views

File access forbidden in htpasswd [closed]

I have been using the htpasswd generated in this question and it seemed to have been working well until recently. Since yesterday, I am not able to access the newest file created in the folder ...
2
votes
2answers
140 views

How do I forward/redirect a website from a folder in a subdomain to another server?

I have a client with a site at subdomain.example.com/folder. I've cloned it locally in MAMP. Once I've made some changes, I need to host it at an alternative physical server (I intend to use a ...
1
vote
2answers
354 views

How to Do htaccess 301 Redirect from Old Filename Pattern to New Filename Pattern?

I have a bunch of old files prefixed with "old-" (e.g. "old-abcde.php"). I need an htaccess rule to set up a 301 redirect so that any request for a file starting with "old-" goes to its corresponding ...
0
votes
1answer
1k views

Link to pages on site without .html extension appearing in browser?

I've modified my .htaccess file to allow access to html files without having to include the extension on the end, for example: www.mysite.com/document directs to www.mysite.com/document.html ...
3
votes
2answers
4k views

Removing .html and index.html from URL

I'm having some problems trying to Remove the .html extension from URLs Removing 'index.html' from an URL 1) To remove the extension I have tried using this in my htaccess file. RewriteEngine on ...
2
votes
2answers
380 views

Help with URL Rewrite

I have a page that selects some info from a database and displays it with a link to a second page that uses the result to query the database, something like this: $sel=mysql_query("select id, title ...
2
votes
2answers
765 views

getting 500 intenal error when setting 301 redirect using .htaccess

I am trying to use a 301 redirect to direct users and bots to my new site but when I put the .htaccess live i keep getting a 500 internal error shown. The site is actually a subdomain which i want ...