Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
1answer
235 views

Is my .htaccess settings hurting SEO?

I have a site that I have redirecting to HTTPS. I do this to leverage wildcard SSL for my password protected pages. Everything seems to work fine with testing. For example, whether you type in HTTP or ...
1
vote
2answers
274 views

WordPress .htaccess preventing subfolder access

This is sort of a goofy setup, but it's not in my power to reconfigure it at this time. I'm running in a shared hosting environment. The domain is example.com. This is an add-on domain on the host ...
1
vote
2answers
2k views

Make a custom Apache handler (for multiple PHP versions)

I've successfully installed PHP 5.2 and it runs as CGI. (5.3 is my default running on mod, or as the phpinfo says "Server API: Apache 2.0 Handler") Ultimately I want to put something like ...
2
votes
1answer
262 views

htaccess code for maintenance page redirect

I set up a maintenance page that I could enable through an htaccess file. The html file is located in a folder called "maintenance". The html file has some images in it. However, visitors to the page ...
3
votes
2answers
396 views

301 redirect to 404 page?

Currently i'm migrating www. prefix from my urls and use htaccess to do the job. Since we have new software and cleaned database some of the old urls doesnt exists anymore. Therefore some requests ...
2
votes
1answer
90 views

301 re-direct all external links to new domain

I have changed the main domain to a sub-domain & would like to re-direct all external links to the new sub domain. Have read a few articles but having no luck editing the .htaccess as it might be ...
6
votes
2answers
895 views

Allow access to WordPress site only by links in email newsletters

I send out a personal email newsletter, and have been looking into sending it via some service like MailChimp, or sendy.co. Many of these email services suggest, or require, the email newsletter ...
3
votes
1answer
259 views

RewriteRule for URL Subdirectory Root

Have not found this in my searches on SE. I need this scenario to work: • User visits someurl.com/news/folder or someurl.com/news/somefolder/, they get redirected to someurl.com/somefolder. • If ...
2
votes
1answer
2k views

Google Chrome audit: resources are explicitly non-cacheable?

If I run a Google Chrome audit on a site, it lists all CSS, PNG, JPG, JS files and even the main domain (i.e. www.example.com) under the heading: Leverage browser caching The following resources ...
2
votes
3answers
623 views

How to remove /index.html

How to make redirect /index.html -> / in Apache? Redirect /index.html http://domain-name.com/ Is causeing infinite loop when opening home page.
2
votes
1answer
7k views

Enable 'mod_rewrite' Using .htaccess File On cPanel Shared Hosting Server

I'm using cPanel to host my website. I need to enable 'mod_rewrite' on this Shared Hosting cPanel account to run my script. I've tried to Google the solutions high and low but did not find any luck ...
4
votes
3answers
2k views

using .htaccess to redirect .asp to .php?

Ahoy all! I've been racking my brain with this one. I basically just converted all of my pages from ASP code to PHP code. Kept the same filenames. So, here is the htaccess code I have so far, but ...
3
votes
1answer
157 views

301 redirect for a page with a space in it

I have some pages from a client's old template-based site which have spaces in them. For example, one of the pages looks like this: example.com/page.php?domain_name=example.com&viewpage=Gallery ...
1
vote
3answers
1k views

.htaccess 301 redirect with regex?

How to do this with regular expression? Old -> New http://www.example.com/1.html -> http://www.example.com/dir/1.html http://www.example.com/2.html -> http://www.example.com/dir/2.html ...
1
vote
1answer
204 views

Removing 301 redirect from site root

I'm having a look at a friends website (a fairly old PHP based one) which they've been advised needs re-structuring. The key points being: URLs should be lower case and more "friendly". The root ...
2
votes
1answer
114 views

Rewrite catalog/index.php to www.domain.co.uk [closed]

We have an online shop with a welcome page. Our SEO company has asked us to get rid of the welcome page with a rewrite. I am struggling to get this to work. Can you help please? I want to rewrite ...
3
votes
2answers
235 views

How do sites avoid SEO issues and legalities with subdomain unique ids?

I was looking through a few websites recently and noticed a trend I'm not sure I understand. Sites are creating unique referral URLs for customers in the form of: http://customname.site.com (If ...
1
vote
2answers
142 views

How can I rewrite a subdomain to go to a specific file in a specific folder?

I've done searching for my answer and have tested a few solutions, but nothing has worked so far. I'm trying to get a URL like this http://baseball.sports.com to rewrite to ...
0
votes
1answer
131 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
296 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
282 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
885 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
321 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
744 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
219 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
211 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
175 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
665 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
313 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
678 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
257 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
182 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
218 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
316 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
148 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
378 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
835 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
145 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
153 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
704 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
754 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
702 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
526 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
415 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
290 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 ...