Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

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. ...
2
votes
2answers
729 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 ...
2
votes
1answer
281 views

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

I have a parked domain example.co.uk on another domain name web-space in a folder and need to rewrite the domain name in the browser URL as it currently shows the other domain name while browsing and ...
2
votes
1answer
255 views

mod_rewrite for directories

One of our developers who built the framework that our website uses is no longer with us and I appear to have a stack of issues across the site currently, one being URL rewriting across the site. ...
2
votes
1answer
592 views

GoDaddy-Drupal Site down due to mysql password change, how to change it back?

PDOException: SQLSTATE[28000] [1045] Access denied for user 'lev1127301002684'@'188.121.41.131' (using password: YES) in lock_may_be_available() (line 167 of ...
2
votes
1answer
670 views

How to redirect user into mobile website?

Hi how to redirect the user into mobile site when the user accessing from mobile. Say example i have site called www.mysite.com. Now, a person accessing a website from mobile it should redirect to ...
2
votes
1answer
2k views

How do I make SEO friendly URLs from my PHP pages?

I'm pretty new to this and was wondering how to turn my site URLs into SEO friendly URLs using .htaccess and mod_rewrite? My URLs take the form mydomain.com/index.php?pid=1&pagename=Some Page I ...
2
votes
2answers
2k views

Is it possible to force a directory index to display even if an index file exists?

On my Apache server I need to display a directory index of a given folder even if it already contains an index file that has been defined in DirectoryIndex. In this case an index.html file exists, but ...
2
votes
1answer
194 views

How to come back to old URL already redirected with 301? What is the impact to SEO?

I have recently moved my old site (built with DreamWeaver) to a new one (with new design and using WordPress). It was done last August, 1st and as the URLs with WP changed completely, I had to do ...
2
votes
2answers
985 views

Joomla 1.5 to Wordpress 3.1 migration: how to redirect Joomla's permalinks

I'm migrating a Joomla 1.5 site to a WordPress 3.1 site (I will later update to WP 3.2.x) and I've found the right tool to do it, a plugin called Joomla 1.5 Importer. There is another plugin called ...
2
votes
1answer
450 views

Duplicate content for sub domains i.e. example.com/subdomain/index.php seen the same as example.com/subdomain/ [duplicate]

Possible Duplicate: What is duplicate content and how can I avoid being penalized for it on my site? I have a website with some sub domain folders and seomoz is picking them up as both ...
2
votes
2answers
132 views

Implications on automatically “open” third party domain aliasing to one of my subdomains

I have a domain, let's call it www.mydomain.com where I have a portal with an active community of users. In this portal users cooperate in a wiki way to build some "kind of software". These software ...
2
votes
1answer
79 views

Redirect all images in a directory to another website using .htaccess

How can I redirect all .png and .jpg image URLs within the /tool/img directory to another website? Filenames can consist of special (unicode) characters. For example, the following URL: ...
2
votes
1answer
45 views

SEO results in updating periodically a 301 redirect

I'm in the unfortunate situation of managing a very old website, that has been passed by the hands of at least 5 webmasters. Each has implemented new sections and other pages without regarding ...
2
votes
2answers
103 views

Changing from parameter to readable URLs 301 redirect

I've recently changed my URLs with parameters to more readable URLs with the following .htaccess: RewriteRule ^page/([A-Za-z0-9-+_\s]+)$ /index.php?n=$1 [L] RewriteRule ...
2
votes
3answers
992 views

Enable use of .htaccess

I'm trying to enable use of htaccess file in Ubuntu 14.04 (Apache 2.4.7). I know that this question has many possible dublicates, but none of them helped me yet. .htaccess: ErrorDocument 404 ...
2
votes
1answer
90 views

How to noindex a 404 page using .htaccess?

I have several 404 not found pages which I would like to noindex through .htaccess. how do I do it with X-Robots-Tag?
2
votes
1answer
89 views

Simplest way to lock down a beta web site but allow paypal payments

Perhaps a strange question, but I have a website that's not ready for production use online in order to test paypal payments. I had locked down the site using a .htaccess file however this also ...
2
votes
1answer
448 views

Redirect with HTTP_HOST redirects to sub subdomain

The settings I have the following .htaccess rule RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} !^de\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] This works great to ...
2
votes
2answers
62 views

Need help writing .htaccess / Apache rule

I have some URLs which are now 404 due to site upgrade. I want all URLs starting with www.example.com/archives/* to point to www.example.com/news (notice that after archives there is a wildcard ...
2
votes
1answer
77 views

Redirect URL with query string to homepage

I can't figure out how to make users visiting my website using links like: mysite.com/?ref=XXXXXXX see the homepage instead of a completely blank page. I tried using htaccess but I can't figure out ...
2
votes
1answer
72 views

Prevent Google Indexing SubDomains

I have cPanel Hosting with only 1 IP. I'm in the process of pointing all my TLDS over to this server. I have created 'Addon Domains' and all the folders from which it creates are located in sub ...
2
votes
1answer
68 views

Inserting WordPress in a site with .htaccess Rewrite Rule

I want to insert a WordPress blog in a website which is programmed in PHP and that uses includes() to select what content to show, and that uses .htaccess Rewrite Rule to get friendly URLs. The ...
2
votes
1answer
221 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
558 views

Apache htaccess results in files being downloaded instead of displayed

So I had this "beautiful" website that did exactly what I wanted it to do. Then I shut down my PC, reboot and...the pages just download now instead of being displayed. I re-installed XAMPP and ...
2
votes
1answer
98 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
108 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
171 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
251 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
215 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
1k 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
68 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
64 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
201 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
87 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
265 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
101 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
174 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
632 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
824 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
95 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
226 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
85 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
217 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
6k 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
759 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
313 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 ...