Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
1answer
152 views

URL/Crawl Errors continue to increase after pharma hack

I'm working with a site that was hacked a couple of months ago and was sending out a ton of spam. The problem seemed to have started with a dormant WordPress blog that was part of the site (so the ...
2
votes
1answer
86 views

What is correct syntax for .htaccess 301 redirect of query based URL to new URL?

I wish to set up some 301 redirects to new URLs and I am trying to do this with the redirect facility in cPanel. For some reason the requests are not being processed correctly and I am guessing that ...
2
votes
3answers
82 views

Different authentication for HTTP POST and GET requests in Apache

I want to authenticate for POST requests for http://path/to/logical/abc.xml (but not GET requests to that URL). How do I put constraints like this in place? The paths are logical and location ...
2
votes
1answer
149 views

Restricting post method and authentication to specifc URL paths in Apache .htaccess

I shall start with an example. I want to restrict to POST requests only for http://path/to/logical/abc.xml and restrict to GET only for http://path/to/logical/def.xml. How do I put constraints like ...
2
votes
1answer
239 views

access-control-allow-origin not working?

I've seen similar questions asked here but I am still unable to solve this issue. I'm running Typekit and FontAwesome (from CDN) and I get the following error XMLHttpRequest cannot load ...
2
votes
2answers
182 views

How can I track clicks on various links pointing to same redirect using Google Analytics?

I'm doing a marketing campaign for an app where I'm targeting different schools. I want to know how many people have clicked on each link. The number of schools is pretty big, so I don't want to ...
2
votes
2answers
966 views

Mod-rewrite rule broken after host upgrade to Apache 2.4

I use the following code on my site to remove php extension from links: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
2
votes
1answer
66 views

How to keep my site error-free after chaning my site's URLS?

My site is almost static. It has 64 pages. These pages before today were named with underscore. After checking my sites SEO with WooRank, the site advices me to change underscore links to dash links. ...
2
votes
1answer
63 views

Simple RewriteRule [duplicate]

I'm trying to write a RewriteRule to make a simple url. I want users to be able to type enter www.example.com/somepage and have it take them to www.example.com/abc/somepage.php How can this be ...
2
votes
1answer
174 views

Redirect domains single pages and maintain url

I have several domain names that need to point to individual pages on a single host and still maintain the URL. For example: examplesite1.com needs to point at mainsite.com/examplesite1.php but ...
2
votes
1answer
84 views

.htaccess redirect with mod_rewrite

I moved my wiki from http://jklatex.square7.de/wiki/doku.php/start to http://logicpuzzle.square7.de/start and now i want to redirect the URL with mod_rewrite. My .htaccess is as follows: # BEGIN ...
2
votes
1answer
399 views

edited and reversed changes on .htaccess - site starts redirecting to .comindex.php/

Site is a Joomla 2.5 site. I wanted to add a non www to www redirect to the htaccess file, did so, then the redirection went mad, reversed but still the site redirects. When i click view site in ...
2
votes
1answer
252 views

Redirects On Image Files to Counter Google Image Gallery

The recent update to the way that Google displays images appears to have resulted in a significant drop in the traffic reaching the actual pages of our website. We are considering potential solutions ...
2
votes
2answers
87 views

My .htaccess entry is not working

The below are all my .htaccess entry: RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.acethehimalaya\.com$ [NC] RewriteRule (.*) http://www.acethehimalaya.com/$1 [R=301,L] redirect 301 ...
2
votes
2answers
168 views

Does https affect me from being indexed?

In my .htaccess, I am forwarding all non secure traffic to https: RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://site.com/$1 [R=permanent] My website still hasn't been indexed yet and ...
2
votes
1answer
566 views

How to make Htaccess file call external IP block lists?

Well, I don’t know if this is an easy thing to do, but I haven’t figured it out yet. Instead of continually updating my Htaccess file with newly updated country IP block lists (because my htaccess ...
2
votes
1answer
633 views

How to set htaccess working on opensuse for codeigniter project

I'm trying to have htaccess work on codeigniter project but the module is not working and I don't know how to enable rewrite module. To have read the htaccess. The OS is Opensuse 12.2. I have this ...
2
votes
1answer
93 views

htaccess URL rewriting

I want to redirect a request look like mydomain.com/abc/def to mydomain.com/abc/index.php?q=def where abc is a fixed directory name and def can be any string. How can I do this using .htaccess? ...
2
votes
1answer
66 views

htaccess rewriterule for aliasses

On our main domain we are running a CMS which feeds several domains with different input. The domains are directed with A records to the main ip address. The htaccess works fine it will bring up the ...
2
votes
1answer
153 views

how to fix .htaccess - redirect http://408.111.1111.domain.us/ to http://domain.us/index.php?w=408.111.1111

We want to use mod_rewrite and .htaccess to do a redirect. How do we redirect http://408.111.1111.domain.us/ and www.408.111.1111.domain.us/ to http://domain.us/index.php?w=408.111.1111 ? If the ...
2
votes
1answer
219 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 ...
2
votes
1answer
80 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 ...
2
votes
1answer
176 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
1answer
5k 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 ...
2
votes
1answer
661 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 ...
2
votes
1answer
306 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
511 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 ...
2
votes
1answer
348 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 ...
2
votes
2answers
135 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 ...
2
votes
2answers
355 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
1answer
265 views

.htaccess rewrite , parked domain on another site to read the proper domain name

I have a parked domain ¨mysite.co.uk¨ on another domain name webspace in a folder and need to rewrite the mysite.co.uk domain name in the browser URL as it currently shows the Other domain name while ...
2
votes
1answer
408 views

htaccess preventing sqlite database being downloaded

I have a VPS, running apache2 on Debian 6. Created a file called .htaccess on the web root, which included: <Files ~ "\.db$"> Order allow,deny Deny from all </Files> ...
2
votes
1answer
980 views

Subfolder non-www redirect

Is there a way to redirect a sub folder to no-www? What I use is: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] but this only ...
2
votes
3answers
3k views

.htaccess mod_rewrite 500 internal server error

Whenever I place my .htaccess file in my web directory I receive a 500 internal server error and within the error.log file specifying: [Sat Jan 21 13:46:07 2012] [error] [client xx.xx.xxx.xx] Request ...
2
votes
1answer
847 views

.htaccess file ignored on Ubuntu Apache 2 server

I'm having a problem with an .htaccess file on a newly installed Ubuntu server running Apache2. The .htaccess file in the directory where the WordPress files are located isn't being take into account ...
2
votes
1answer
596 views

CMS Made Simple: Why does home page return a 404 under www subdomain?

Anyone know why my homepage wont load with the www prefix. Links such as www.mysite.net/about-us will load fine but www.mysite.net returns a 404. Everypage works including the home page if I ...
2
votes
1answer
2k views

Extend depth of .htaccess to all subfolders and their children

I need to be able to use .htaccess in all subfolders for full depth. E.g. I have .htaccess in public_html folder: \public_html\.htaccess How I make it to work for the folder small as well? ...
2
votes
1answer
392 views

Modify .htaccess to allow existing files without extension to be served

I have the following .htaccess: #If the requested URI does not end with an extension OR if the URI ends with .php* #(where * is optionally one or more numbers) RewriteCond %{REQUEST_URI} !\.[^/]+$ ...
2
votes
1answer
90 views

Issue with permanent redirect implementation

I have a tricky problem related to 301 redirections I badly need help with. I tried to implement these via .htaccess, but ran into trouble. The start of my .htaccess looks like this: SetEnv PHP_VER ...
2
votes
1answer
117 views

Effective combatting of 100's of spam links in Google Results

I have recently been the victim of this hacking exploit (blog post is for reference only and is not my site. I'm in the process of following it and cleaning up after the attack). Note the exploit at ...
2
votes
1answer
736 views

.htaccess mobile redirect issues

I'm trying to set up a mobile redirect for a site with 2 subfolders, and I cannot get both to work at the same time. This is the structure of the site www.mysite.com/EN/ www.mysite.com/ES/ This is ...
2
votes
2answers
63 views

I want to redirect anyHOST.anyTLD to www.anyHOST.anyTLD

I'm trying to find a generic enough modrewrite rule that will acomplish following: Redirect anyHost.anyTld to www.anyHost.anyTld Not mess with any other subdomains, for examle other.anyHost.anyTLD ...
2
votes
1answer
327 views

Merging two sites into one, how to redirect from the domain that's going away?

I haven't been able to find any existing questions that cover my exact issue, so here goes: My client wants her two sites (domain1.com and domain2.com) rolled into a single, new site under ...
2
votes
1answer
483 views

Multiple 301 redirects, do search engines/viewers see them all?

I've put in place lots of different 301 rules to deal with numerous url changes. And for certain URLS there are 3-4 different 301 redirects landing the visitors to the new URL. I heard that 301 ...
2
votes
1answer
1k views

Joomla 1.6 URL rewrite on IIS7 (removing /index.php/)

Joomla 1.6 was released today and I'm wondering if anyone knows how to get rid of the /index.php/ part? How link looks now: http://www.example.org/index.php/stuff How link would look after URL ...
2
votes
1answer
95 views

file need to go through a php page using .htaccess

I'm looking for a way to convert this type of url : h11p://www.mywebsite.com/dl/F5EGD6 Into h11p://www.mywebsie.com/dl/files/my_file.zip sing a PHP page to request the URL from the DB with F5EGD6. I ...
2
votes
1answer
514 views

What are the AllowOverride settings if you're hosted on GoDaddy?

I'm looking for the AllowOverride setting for GoDaddy hosting, does anybody know where I can find that?
2
votes
2answers
319 views

How can I rewrite an old URL using variables to a static html page?

I am an htaccess newbee I am trying to redirect the old URLS for my site to the new URLS for my site. The old site used variables in the URL but the new site uses SEO friendly URLs. When I try to ...
2
votes
5answers
181 views

Apache URL rewriting not working

All .php files are rewritted before doing the below rewriting: test.php => test foo.php => foo I want to rewrite this URL http://www.testdomain.com/test?name=john&id=2&nick=doe to ...