Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
1answer
38 views

Should I block ftp & mail in urls?

Should I block ftp & mail in urls that shows up in the Latest Visitors Logs? Are they a bot, hacker or misconfigured server? Examples: ftp.somesite.com, mail.somesite.com IF so; how would I ...
4
votes
2answers
373 views

GoDaddy: RewriteCond in .htaccess not working with “beginning of the line” (^)

I have .htaccess containing RewriteCond and RewriteRule. It used to work just fine (it's been a long time since I last checked), but now it has stopped working. I have narrowed it down to the ...
1
vote
0answers
105 views

Enable pagespeed_module in Godaddy’s Deluxe Linux Hosting

I try to enable pagespeed_module in Godaddy’s Deluxe Linux Hosting, the entire .htaccess is as below, <IfModule mod_rewrite.c> RewriteEngine On ## Forward non www to www RewriteCond ...
1
vote
1answer
37 views

How can I disable the certificate/SSL handshake on the 'www' version of my site served by Apache?

We use SSL on the https://www version of our website. Now I would like to disable the SSL connection on the https://non-www version of our website, so the result is: https://non-www => SSL ...
1
vote
1answer
31 views

Write htaccess rewrite rule which should be point to a directory which is not existing in app directory structure

I need to write a rewrite rule so that the url should be point to a directory which is not existing in the application directory. In WordPress all admin process/code in wp-admin, so someone try to ...
1
vote
2answers
433 views

Why does my .htaccess work for all browsers but Internet Explorer?

The code .htaccess below is working on all browsers, except for IE (I tested it on IE10 and IE11). The goal is to redirect all HTTP traffic to HTTPS, but IE seems to ignore it. Does IE need specific ...
2
votes
1answer
141 views

HTTPS redirect doesn't appear to follow .htaccess RewriteRule, how can I fix this?

I am redirecting example.com to sample.com/?example, so that I can have a modal popup saying, example has changed its name to sample. It works fine for HTTP redirects from http://example.com, and ...
2
votes
3answers
123 views

How do I enable compression to reduce the file transfer size on GoDaddy?

I have hosted one of my website on godaddy.com. How do I enable compression to reduce the file transfer size? I need to compress the .css and .js files. I tried the following but it doesn't work : ...
1
vote
1answer
62 views

IP Address is only 1 period

IP Address is only 1 period on a shared host. How do I block that in htaccess? The IP Shows: . /blog/ 1/30/15 11:56 AM success 200 Mozilla/5.0 (Windows NT 6.2; WOW64; rv:35.0) ...
10
votes
1answer
209 views

How are web applications like Tumblr, WordPress.com and Blogspot able to create subdomains for users so fast?

I am curious as to how web-applications are able to create sub-domains instantly for new users, for example, newuser.wordpress.com, or example.blogspot.com. If I need to create a new subdomain for a ...
2
votes
2answers
300 views

Browser shows IP address instead of my domain name when using Google Cloud

I recently bought a domain name from GoDaddy. I have a web server running in Google Cloud with a static IP. In the DNS configuration in GoDaddy, I added an A record (@ -> To the static IP of the ...
3
votes
1answer
60 views

Rewrite rule to handle urls that start with a slash, have only numbers and letters, and may end with a slash is not working

im attempting to get my URL to resolve something like http://example.com/?image=2VMt2 Thus my index.php using the [GET] method in PHP to resolve into my domain http://example.com/2VMt2 The rule ...
0
votes
0answers
7 views

Google search results showing up a URL on its search which doesn't exist on the website [duplicate]

I am using a keyword to display a website page on google search. After entering the keyword, on the first page of google, I am redirected to a page, whose domain is exactly similar to the website ...
1
vote
0answers
146 views

Apache .htaccess is redirecting all error documents to index.php [closed]

Instead of redirecting errors to their designated pages my .htaccess is redirecting all non existent/blocked pages to index.php instead. Is there something out of place somewhere? I recently added ...
2
votes
1answer
223 views

HTACCESS redirect a URL with query string in it

Basically you can visit /stats.php?player=name by simply typing in https://domain.com/@name and it works perfectly. But I also need the old /stats.php?player=name links to redirect to ...
1
vote
1answer
229 views

generate seo friendly url for multi language system

I have this url's for multi language system using php : http://mydomain/ <-- default language english (en) http://mydomain/index.php?lang=de http://mydomain/index.php?lang=fr ...
1
vote
2answers
165 views

How do I Add Expires headers for CSS file with ?ver=4.1

I'm optimizing my website with Gtmetrix and in Add Expires headers section it shows the below error- There are 49 static components without a far-future expiration date. ...
4
votes
1answer
199 views

Redirect URLs with a # in .htaccess

On one of my sites I get 404s because some scripts are fetching all URLs from the start page as raw URLs, so they include the # in the URL. Normal browsers don’t ever send that part to the server, but ...
1
vote
1answer
71 views

htaccess code to prevent hotlinking does not work as intended

I have searched a lot this topic, and found this piece of code (or slight variations) in many places, included some answers in this website. This is the code: <IfModule mod_rewrite.c> ...
1
vote
0answers
142 views

Convertion of htaccess rewrite rule to nginx [closed]

Through searching the internet with "converting htaccess to nginx rule" I came up with anilcetin and winginx .htaccess to nginx converter which I doubt it doesn't correctly output what I need. Which ...
2
votes
1answer
35 views

How long do I need my old hosting account after I have moved to another host as well as address? [duplicate]

I had my old website at the********.in and shifted to a .org domain. I also switched the hosting company. Here's what I did - I drove all traffic from old site to the new one with 301 permanent ...
0
votes
2answers
704 views

Baiduspider is crawling my site even when forbidden by robots.txt, how do I prevent it? [duplicate]

My site has heavy traffic because some bot. I checked access_log, some bot Baiduspider go to my site 10-20 times per minute. I do not need Chinese traffic. I have searched and read ...
0
votes
1answer
24 views

How do you activate mycryp and mod_rewrite from .htaccess?

My hosting provider has the option to modify the PHP configuration with the following code in .htaccess: AddHandler fcgid-script .php I would like to know how to activate the extension mcryp and ...
1
vote
0answers
256 views

Excluding Facebook Crawler From Following Htaccess Redirects?

I recently made my website https and it's previous url (http) had many Facebook likes which I would like to migrate to the new https url. The only change to the url was the https, no domain change or ...
1
vote
1answer
44 views

How can I make all created directories assign to a subdomain? [closed]

So we have a .php file that creates a directory that is named after user input from a form, and uses file_put_contents to have a n index.php already in that directory. Our problem is that it can be ...
1
vote
1answer
68 views

How do you match a specific cookie value with Apache 2.4 <If> statement?

I am not able to figure out why the following doesn't match: <If %{HTTP_COOKIE} == 'XDEBUG_SESSION=leho'"> I'm setting a php_value inside the matching If. I know that part works because this ...
1
vote
2answers
65 views

proper redirect taking into consideration http vs https

This seems to be such a standard question, but I am not able to find the answer anywhere. I am trying to solve the famous .htaccess redirect. I have tried / modified / tested a good number of the ...
0
votes
2answers
49 views

Error 500 on new sub-domain

I have just uploaded a site on a sub-domain, In fact on the 3rd Sub-domain. All the 4 site ( 1 Main, and the 3 on SUB) are completely separate from each other. Now, the site was developed ...
-1
votes
0answers
17 views

Hiding and redirecting extensions on my webpage [duplicate]

I want to hide extensions on my webpage using the .htaccess file. I have managed to do it by using this code; RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php ...
1
vote
2answers
48 views

Hiding and redirecting extensions on my webpage

I want to hide extensions on my webpage using the .htaccess file. I have managed to do it by using this code; RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php ...
1
vote
1answer
94 views

Fastest Redirection on Apache Server with Wordpress for a Small ~200 Page Website

If I have a website of about 200 pages and most of the links will be inevitably changing, what is the faster way to redirect them (fastest not in terms of how quickly I can do it, but in terms of the ...
1
vote
2answers
81 views

Creating redirects list from a domain alias to a primary domain

I am trying to set up a list of redirects in my .htaccess to create a manually defined 'short url' list, whereby the short url domain ("short.com") is set up as an alias for the destination domain ...
1
vote
1answer
72 views

When a mod_rewrite redirect is in place, do absent <img>s still cost more server time than present <img>s?

I have a series of webpages in which the <html> refers to: <img src="img1.png" [...] /> <img src="img2.png" [...] /> <img src="img3.png" [...] /> After I realised that ...
2
votes
2answers
51 views

Prevent my hosting server from adding a JavaScript snippet to my page?

My host adds JavaScript in particular cases. I want to prevent that. Maybe through .htaccess? The added code is the following So, even preventing their PHP from executing would be useful.
1
vote
1answer
274 views

Using htaccess to internally and externally redirect a page at the same time [duplicate]

I've been trying to figure this out for two hours, and I give up. I want to externally redirect about.php to about/, and also have about/ internally redirect to about.php RewriteRule ^about/$ ...
1
vote
1answer
219 views

How can I pass optional URL parameters through my rewrite rule?

I created a CMS that identifies if the GET value of url is defined, and if it is, it returns the html contents of the page from the frontend template on index.php. This ideally is to make a templating ...
1
vote
0answers
154 views

Can Apache .htaccess convert the percent-encoding in encoded URIs from Win-1252 to UTF-8?

I want to add a directive in my .htaccess, such that if the browser is pointed at a URI containing %E4 (ä) - or any other special character - the .htaccess automatically rewrites %E4 (ä) as %C3%A4 ...
1
vote
1answer
53 views

Removing “product.php” in URL using .htaccess

The current URL: http://www.example.com/product.php/sample-product.html. I want change it to: http://www.example.com/sample-product.html
0
votes
2answers
279 views

Remove folder name from rewritten URLs

Consider this URL: http://example.com/gallery/20141111-some-title In this URL I want to hide gallery/: http://example.com/20141111-some-title How can I achieve this using mod_rewrite? I used ...
2
votes
1answer
49 views

Links on Google result list with unnecessary parameters

I have a website that uses .htaccess to turn the parameterized URLs into a folder pattern based URL For example : www.example.com?lang=de&cat=mycategory becomes www.example.com/de/mycategory ...
1
vote
2answers
131 views

Use .htaccess to configure subdomains serve content from folders rather than from the root domain

Here is site http://www.glassnow.com.au/ With 3 subdomains: brisbane.glassnow.com.au goldcoast.glassnow.com.au sunshinecoast.glassnow.com.au Here is htaccess RewriteEngine On RewriteBase / ...
2
votes
1answer
48 views

Forbid users from accessing a long URL while allowing access to a shorter one with mod_rewrite

I'm trying to block the following URL: www.example.com/Ayurveda/article/guna/alkalizing/contains/non-vegan/experience/relieves-burning But I want to allow: ...
1
vote
1answer
70 views

Non existent image files are not being handled by PHP as they should due to ngnix configuration

I am currently building a web application. In order for it to work properly I wrote this rule: location / { if (!-e $request_filename) { expires 168h; add_header Pragma public; ...
2
votes
1answer
145 views

WAMP: Properly directing image paths on local server

I'm using ExpressionEngine to build a site, and have a development version running locally via WAMP. Within the root "www" folder, I have an "ee" subdirectory that acts as the root of the development ...
1
vote
2answers
699 views

Remove trailing slash and index.html in .htaccess

I seem to be stuck here trying to figure out how to redirect the following scenarios: /foo/index.html -> /foo (remove trailing slash, index.html as 301) /foo/ -> /foo (remove ...
1
vote
2answers
400 views

RewriteRule /change-email.htm?e=someone@somewhere.com&h=xxxxxx

I need to rewrite URL's of this form: /change-email.htm?e=someone@somewhere.com&h=xxxxxx to: /change-email/?e=someone@somewhere.com&h=xxxxx I've done this in my .htaccess: RewriteCond ...
2
votes
1answer
162 views

Redirecting www to non www in subfolder

I have Joomla installed on root folder and another Joomla installed on a subfolder. I want to redirect www to no-www in subfolder by this code in blog .htaccess: RewriteCond %{HTTP_HOST} ...
6
votes
2answers
21k views

Font blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin'

we are experiencing this error in Google Chrome. We thought everything was set-up correct. But maybe not? Font from origin http://skin.cdn.com has been blocked from loading by Cross-Origin ...
3
votes
1answer
240 views

Can .htaccess 301 redirects work with encoded characters?

I have an old site with titles in the URL for SEO, but it has URL encoded characters than transliterated Latin characters. Like %20 instead of space character and many other non-Latin characters. The ...
1
vote
2answers
72 views

How to display “Not Found” instead of automatic redirecting?

how to redirect to 404 in .htaccess file ? Example www.domain.com/ja/any_post or www.domain.com/ja/all_posts www.domain.com/fr/any_post or www.domain.com/fr/all_posts A little bit more ...