Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Multisite permalinks for subfolder wordpress installation [migrated]

I have WordPress installed in a subfolder of the main site: http://www.example.com/blog/ Now I need to add second blog on http://www.example.com/blog/second/ So 2 blogs should work on the following ...
0
votes
0answers
23 views

Apache Redirect to another folder, both within and outside document root

I've recently set up a home web/media server and having a few difficulties with a few of the settings. It's working fine for serving webpages etc but I've now reorganised the structure of the main ...
0
votes
0answers
18 views

Google Indexing PHP pages with and without backslash [duplicate]

How can we use the .htaccess file to only have our pages indexed by Google without the trailing slash. Right now both pages are being indexed.
1
vote
4answers
75 views

Should error pages be strictly html?

I'm using PHP on Apache server I'm wondering.. If the error pages should best be served as pure and simple html, without database connection etc.? This would remove any chance of ...
1
vote
1answer
51 views

htaccess rewrite doesn't work

I'm trying to redirect url's in my /joomla/ folder containing "rsform" to the same url but except for /joomla/ /formulieren/. However my tried .htaccess rewrite doesn't work. I tried: RewriteEngine ...
0
votes
3answers
89 views

.htaccess rewrite problem for domain

I want to use a particular page in my site as any subdomain. I need something like this http://*.site.com/. So, as the user types http://user1.site.com/ or http://user2.site.com/ then the page must ...
4
votes
1answer
38 views

Statically mapping a PHP script to another script using an .htaccess file results in 404 errors

After having read a lot of posts on the topic of URL rewriting, I still remain stuck with 404 status errors. My goal: A 'static' rewrite of URLs, as follows (user clicks or enters the one ...
1
vote
4answers
42 views

Using a .htaccess to RewriteRule and Redirect 301 at the same time?

I have a couple of specific URLs that I want to display differently on my website, like this: RewriteRule ^contact$ contact.php To get ride of the ".php" extension. And to be SEO friendly (to ...
1
vote
1answer
26 views

How can I setup a redirect using an .htaccess that would keep part of the URL path?

I would like to setup a redirect using an .htaccess file which keeps part of the URL's path in the target URL. For example: I have the domain example.com. I want example.com/social to redirect to ...
1
vote
1answer
37 views

Avoid 301 redirect in cdn.domain.mx

I have a domain with a .htaccess redirection problem. The active CDN the URL should be: cdn.domain.mx/images/test.png but redirects: cdn.domain.mx/images/something.png -> ...
2
votes
2answers
40 views

non-cachable Canonical redirect of www to non-www

I know this question is debatable for the whole eternity, and most likely nobody knows the real philosophy of this problem. But I'm trying to solve the problem about 301 and 302 response headers in ...
5
votes
2answers
634 views

How can I disallow access to my website by its IP address?

I want my website to be accessible only by the domain name, not by the server’s IP address. How can I configure Apache to achieve this? Below are the VirtualHost configurations of Apache. ...
1
vote
2answers
48 views

Multilingual website without any index file in the root folder

My client has a very simple website with two different languages and I decided to make a separate folder for each language, for example: domain.com/en/ domain.com/de/ But in the root folder there's ...
0
votes
1answer
72 views

Code for redirecting an HTML page without an extension using an .htaccess file results in a 404 error

I'm trying to redirect an HTML page to a WordPress page which has no extension. The result of redirecting example.com/fa/home.html to example.com/fa/ is a 404 page not found. As you can see they're ...
0
votes
2answers
73 views

How can I remove the .html extension for static webpages that are indexed so they'll still work in a WordPress site?

I have a static HTML website with less than 100 pages and 99 of them are indexed in Google's search engine. I want to convert it into a WordPress website, but there are some problems I'm worried ...
1
vote
1answer
36 views

How can I create a shorter alias URL to a longer URL using an .htaccess file?

Using an .htaccess file, I want to make one specific URL have a shorter alias like this: Original URL: ...
0
votes
0answers
29 views

htaccess Rewrite changes the URL which I don't want [closed]

I use this rewrite rule at my local Apache server: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^ellada\/(.*) public/index.php/$1 [L,QSA,NC] RewriteCond %{REQUEST_FILENAME} !-f ...
0
votes
1answer
49 views

Google can no longer fetch pages after successful URL rewrites using an .htaccess file

I tried to rewrite my URLs so they no longer have the .html extension. But when I did this (successfully) Google can no longer crawl my pages when I use "Fetch as Google". Instead, it returns 404 ...
1
vote
1answer
91 views

301 redirection removes UTM tags from URLs

A page redirects to another page using a 301 redirect in a .htaccess file. If try to access the page from a URL with UTM tagging after redirection, it removes all UTM tagging. Is this normal ...
0
votes
1answer
27 views

How to include/install mod_proxy_http.c on JustHost

I'm using a service that requires a URL to be sent to their site so that it can return an HTML snapshot to Googles crawlers. In their .htaccess code it has the line <IfModule mod_proxy_http.c> ...
1
vote
1answer
80 views

RewriteRule to send all URLs with `mod` in them to the `moderator` directory

I have a .htaccess file in the root directory of my project, that contains all the rewrite rules for the site to functions. Most of these rules belong to the mod section of the site, and only two of ...
2
votes
1answer
45 views

Rewrite up to three folders into three query string parameters to a PHP script

I'd like to use mod_rewrite within the .htaccess file to rewrite folders to a var string. Below is examples of current and what I would prefer. Current URL: example.com/main/folder1/folder2/folder3 ...
0
votes
4answers
35 views

Problem getting rewrite from subdomain to directory to work

I want to redirect demo.example.com to example.com/my-demo. This is my rewrite rule, but I'm not getting it to work on my production server: RewriteCond %{HTTP_HOST} ^demo\.example\.com ...
1
vote
1answer
69 views

Redirect all paginated pages to their main category page

I want to redirect all the paginated pages of the category pages to their respective category pages, because I don't want google to crawl the paginated pages. If my paginated category page URL is: ...
0
votes
2answers
45 views

Is using URL parameters bad for SEO? [duplicate]

I recently noticed that my web page have problems with Google and good search results. Many of the existing SEO tools suggests that my website uses bad URLs for SEO. I'm using a single PHP file that ...
0
votes
1answer
53 views

301 redirect to the new website but without apostrophes in the URL

I am trying to 301 a page that has a ' in the URL and regular redirect 301 doesn't work. Is there a way to match part of the URL until the ' and use that to 301 to a new page? Example URLs are below: ...
1
vote
2answers
46 views

Duplicate content error results instead of a 404 page

My current URL is: www.example.com/category/we-developer/ However, if any user mistakenly adds extra characters after the /, for example, www.example.com/category/we-developer/fgggfgg, it should take ...
0
votes
0answers
17 views

IE not using AES on Website

I hope I chose the right topic this time :) So: I wanted to disable RC4 and "force" PFS on my website. Without modification, every browser used RC4. As I don't have access to the root directory I did ...
1
vote
1answer
48 views

How can I log a user's actual IP address instead of CloudFlare's?

My raw access log is now filled with CloudFlare IP addresses. Is there any way I can use a .htacess file or configure the server to log the user's actual IP address? With PHP, CloudFlare creates ...
1
vote
1answer
35 views

Changing the Preferred Domain in Google Webmaster Tools resulted in zero stats

I set my Preferred Domain for my website with www in Google Webmaster Tools, then I added the following code to my .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com$ ...
1
vote
1answer
193 views

htaccess/cPanel 301 redirects not working for add-on domain

I've already looked at many samples and tutorials how to set up those 301 redirects on Apache and can't figure out why some are not working. Whenever I want to redirect any still existing page from ...
1
vote
1answer
54 views

Use different .htaccess file based on set header from browser

I want to have the ability to test .htaccess rules before saving them to the main .htaccess file. Is it possible to set a specific request header and have Apache use a set of rules from a different ...
3
votes
2answers
65 views

How does one redirect from one wordpress page to another via htaccess?

I tried making the following change to my wordpress site to permanently redirect a common link to a new page. I could've -sworn- that this used to work. But it simply does not (at least in WP 3.9). I ...
1
vote
1answer
183 views

.htaccess URL rewriting friendly URL with 2 parameters, the second parameter is optional

I'm kind of stuck at this part and was hoping that I'd get some assistance. I'm building a highscores page in PHP, that's going great, it works. However, I dislike the idea of index.php?skill=name and ...
3
votes
1answer
43 views

Best way to move site from subdomain to root through cPanel?

I have an old Wordpress blog hosted on a subdomain (sub.mysite.com) with hundreds of posts. The root domain is actually empty and redirected to the subdomain. Now I want to move the site from the ...
0
votes
0answers
54 views

How to prevent a 404 Error when creating a subdomain and using www to access it?

I have installed a multi-site installation of WordPress onto my domain. I then added the necessary code to the wp-config.php file and .htaccess as instructed by WordPress. I also installed a plugin ...
1
vote
1answer
48 views

Confused about redirect and robots.txt

I am updating a site by creating new pages and deleting old ones. To avoid crawling errors should I use both a robots.txt file and 301 redirect on .htaccess? robots.txt: Disallow: /products.php ...
1
vote
3answers
80 views

index.html in subdirectory will not open

I want to have a website structure like this: example.com/ - homepage example.com/solutions/ - this will be the solution parent page example.com/solutions/solution-one - child solution page ...
1
vote
1answer
40 views

Skip part of URL

I have a server running on XAMPP in LAN. In htdocs I've created subfolder called 'apps' (it's because I'm using one CodeIgniter's files to multiple webpages). Now, when somenone want to visit a ...
2
votes
1answer
99 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: ...
0
votes
0answers
50 views

.htaccess and 301 redirects .co.uk to .com

I want to redirect a .co.uk to .com: example.co.uk/any-file-or-folder and example.com/any-file-or-folder to www.example.com/any-file-or-folder. I've refered to this question/answer: htaccess and ...
4
votes
1answer
80 views

How can I serve all resources under HTTPS instead of HTTP without changing their URLs in the HTML code

I know that by using an .htaccess file I can redirect everyone to https://. However, my SSL certificate complains if all the content isn't served under HTTPS. Is there a way to convert all the ...
3
votes
3answers
251 views

Redirection to load a CSS file

I have in a remote server with this index.html that I can not modify: <link rel="stylesheet" type="text/css" href="styles.css" /> But my styles.css file is not at the web root, that is ...
3
votes
1answer
111 views

301 Redirect a domain to another domain, but keeping the subdirectories the same

Is it possible to configure a top-domain (http://x.com) (DNS/.htaccess/else?) to redirect to another domain (http://y.com), whilst if you navigate http://x.com/subdir/index.html, you'd see the files ...
1
vote
1answer
201 views

Redirect Google crawler to different robots.txt via .htaccess

I have googled for the answer all day and still couldn't find an answer. I have a virtual subdomain www.static.example.com which is a mirror site of www.example.com. It means I have just one root ...
1
vote
1answer
68 views

CDN virtual subdomain causes duplicated content

I have created a subdomain and a CNAME record which points to the domain root. The subdomain www.static.example.com is actually a copy of the entire website www.example.com and it is supposed to act ...
1
vote
1answer
88 views

How to block a spam bot .htaccess proper formatting?

I have downloaded my access log file from my cPanel and found I have a bot I would like to stop. In the access log, there User-Agent string reads the following; 88.80.205.219 - - ...
3
votes
1answer
29 views

Which domain should I authorize in my .htaccess to let google spreadsheet access files on my site

I use google spreadsheet feature that allows one to let an image be the content of a cell. The cell is defined by: =image("http://www.example.com/my-pics/my-pic.jpg") It works pretty well. But, I ...
1
vote
1answer
75 views

Htaccess redirecting 404 URLs to Index page

I am trying to setup my htaccess file such that all 404 pages are permanently redirected to the home/index page using 301. After I configure the htaccess file I try to test that it is working ...
2
votes
1answer
48 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 ...