Directory-level configuration file found mostly on Apache web servers
1
vote
1answer
23 views
Wild card redirection for HTTPS and Non-www version
i want to enable SSL for my main website and sub-domain websites. for SEO reasons i need to redirect HTTP requests to HTTPS requests and i think i should do that using wild card redirect in htaccess ...
1
vote
2answers
15 views
Is it possible to configure a .htaccess file to access example.com/subdomain/ without any redirects?
I need to configure 2 CMS's on a domain. The first is on example.com. The other is on subdomain.example.com. Is it possible to configure a .htaccess file so that the second CMS is accessible as ...
0
votes
0answers
9 views
RewriteRule not working properly in my ubuntu server 14.04 running in Windows Azure
In my server I kept signup.php and in htaccess I kept this thing -
RewriteRule ^/registration/?$ http://www.mydomain.com/signup$1 [R]
But this is not redirecting ...
0
votes
0answers
25 views
htaccess for caching adsense javascript code for better pagespeed score
I'm adsense publisher, i need to improve my pagespeed score.
I already got 90/100 for speed and 100/100 for User Experience.
it is google adsense code that prevent me from getting 100/100
here's the ...
1
vote
1answer
19 views
.htaccess RedirectMatch not working when *some* users include “www.” in URL
I have recently moved a site to a new domain, and at the old domain, I created a .htaccess file that includes one line of code:
RedirectMatch 301 ^/(.*) http://newdomain.com/$1
The goal, of course, ...
0
votes
0answers
4 views
I can't access a subdomain, .htaccess
I made a subdomain for my website, something lilke test.example.com. In the main folder of the webhost I do not have any .htaccess file, but in the folder "test" I have one. when I access the ...
0
votes
0answers
22 views
Apache WAMP and .htaccess
I recently installed WAMP and everything is working great, however I git cloned a website I am supposed to work on, and it has a .htaccess on it to allow Slim (PHP framework) to handle the url ...
1
vote
2answers
22 views
Redirecting from a link but allowing the link to still be visited with htaccess
I have three versions of an article on a website. Each one is written a few years after the last and updates the topic to keep it fresh and I want to redirect traffic from the older ones to the newer ...
-1
votes
0answers
17 views
Error Using htaccess
I am using Wordpress site .When We change the permalink to postname the htaccess will be changed so they go to the plain code
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
...
0
votes
1answer
3 views
Trying to rewrite a URL to an existing URL with htaccess
I have a wordpress site up and it's been up for a while. Recently I was asked to change the URL of one of the pages.
The current URL is:
http://url.com/blog/category/newsroom
They want the URL of ...
2
votes
1answer
70 views
Cache control header specified in .htaccess is not working for static files
I'm trying to use Google PageSpeed Insights to speed up my website - www.edmhunters.com.
First off, here is what my .htaccess file looks like
# ...
1
vote
0answers
28 views
Apache virtual hosts configuration for MAMP results in new sites going to the same folder
I have MAMP installed in my mac. Why is it that every time I create a new site, they all go to the same folder? Here is my /etc/hosts file:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 ...
0
votes
1answer
121 views
Leveraging browser caching issue
I am triying to obtain a good calification on Page Speed test, now I've obtained 85 points but I am still on the problem of "Leverage browser caching".
This is the Page Speed test message about this ...
1
vote
1answer
40 views
Redirecting HTTPS to HTTP without purchasing another IP address
So in the past I have always bought a new IP when working with SSL certs. I came across a client that is on a shared IP and using a cert for one of the sites but not the others. So domain #1 has cert ...
0
votes
0answers
16 views
Passing Arabic values in parameters results in % spaces
I have built an .htaccess clean URL, this part works perfect in my .htaccess:
RewriteCond %{THE_REQUEST} /road.php\s [NC]
RewriteRule . نقفورالثانيفوكاس/ [R=301,L]
RewriteRule ^نقفورالثانيفوكاس/$ ...
0
votes
2answers
43 views
My website Internal links are no-follow
I have a website and all the link showing no-follow is it good for SEO purpose? or I want to make it do-follow what should I do now?
Actually my website is access with two version WWW or without WWW ...
1
vote
2answers
46 views
Redirect Everything After slash (/) to another directory
I'm sure this is an easy thing to do but I can't seem to find the answer!
I'm trying to redirect https://carddav.example.com/MYUSERNAME to ...
1
vote
1answer
53 views
Need help getting 'www' working for domains and subdomains using Apache & DNS
I've searched through a lot of different posts asking this question and I haven't really seen a straight forward answer on how to get this working.
At the moment, with the following settings, adding ...
1
vote
1answer
39 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
21 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
76 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 ...
0
votes
0answers
3 views
htaccess rewrite containing “rsform” doesn't work [closed]
The guys at ProWebmasters suggested moving this question to stackoverflow so here I am, original question: ...
1
vote
2answers
68 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
91 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
44 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
56 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
28 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
47 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 -> ...
3
votes
2answers
50 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
641 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
61 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
104 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
90 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
37 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
1answer
52 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
167 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
31 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
87 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
58 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
36 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
96 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
67 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
63 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
53 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
20 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
68 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
38 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
209 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
69 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
67 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 ...