Tagged Questions
2
votes
1answer
102 views
What are the most commonly used and basic Apache htaccess redirects?
This question is here so we can offer users who are looking for information on how to make one or more common or basic redirects in Apache using the htaccess file. All future questions pertaining to ...
1
vote
0answers
99 views
htaccess returning 404 errors on some URLS on website
I have a .htaccess file on my main directory on my website, which basically allows pretty urls (example.com/index instead of example.com/index.html) and it will redirect to a pretty url if someone ...
2
votes
0answers
242 views
RewriteBase has to change when using UserDir
I have setup our Apache server to use UserDir
This mean our urls are:
http://dev.server.com/~username/drupal/html/
Before our URLS were:
http://dev.server.com/drupal/html/
In the 2nd case I ...
2
votes
1answer
368 views
301 Redirect from www to non-www without using VHOST
I have my web application running on EC2 with Apache. I want to redirect www to non-www. On searching Google, I used this but it leads to redirect loop:
<VirtualHost *:80>
ServerName ...
3
votes
1answer
108 views
How to get rid of crawling errors due to the URL Encoded Slashes (%2F) problem in Apache
The Google web crawler has indexed a whole set of URLs with encoded slashes (%2F) for our site. I assume it has picked up the pages from our XML sitemap file. The problem is that the live pages will ...
2
votes
3answers
183 views
How to remove /index.html
How to make redirect /index.html -> / in Apache?
Redirect /index.html http://domain-name.com/
Is causeing infinite loop when opening home page.
3
votes
3answers
353 views
using .htaccess to redirect .asp to .php?
Ahoy all! I've been racking my brain with this one.
I basically just converted all of my pages from ASP code to PHP code. Kept the same filenames.
So, here is the htaccess code I have so far, but ...
2
votes
1answer
222 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 ...
0
votes
1answer
227 views
Rewrite in Mediawiki, remove index.php, htaccess
I've just installed Mediawiki on Apache and I want the url should be
localhost/Main_Page/
localhost/Special:Recent_Changes
...
instead of
localhost/index.php/Main_Page/
...
2
votes
1answer
422 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
286 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 ...
0
votes
2answers
265 views
help redirecting IP address
Google has indexed the IP address of my site rather than the domain, so now I'm trying to set up a 301 redirect that will redirect the IP address and all subsequent pages to the domain.
I currently ...
2
votes
1answer
221 views
Replace 404 with 301 to other subdomain
We have two main subdomains on our site: www.example.edu and php.example.edu. Virtually all of our content is on www.example.edu, but there are a few standalone apps hosted on php.example.edu. ...
1
vote
1answer
117 views
Links don't work on new server
I've recently moved from server with php4 to php5. Now I cant open content in my page. Links look like this "page.com/news-it-is-rainy-day-1.html". But when I try to open link I just get the archive ...
2
votes
2answers
208 views
Apache HTTP redirect from a URL list
One of my web applications will be completely replaced by a new system. All URLs will change and thus external links would break. I want to setup Apache httpd to answer with proper 301-redirects to ...
2
votes
1answer
535 views
sub folder non-www redirect
Is there a way to redirect a sub folder to non-www?
What i use is:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
BUT this only ...
0
votes
2answers
357 views
domain.com to www.domain.com .htaccess redirect working except one subdir
I've setup a redirect in .htaccess to consolidate domain.com to www.domain.com traffic on our Apache server.
Looks like this:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ...
1
vote
1answer
82 views
Recommended way on implementing 301 redirects
I am rebranding a website, which involves changing the domain name. I want to know the best way of redirecting traffic to the new domain, using 301. Ideally, I will do this at the webserver (Apache) ...
5
votes
2answers
1k views
.htaccess directory to subdomain
I have been trying to make a subdomin from a directory (made by .htaccess) to be used as the main page starting like http://domain.com/sub/2/3/4.html and turning into http://sub.domain.com/2/3/4.html.
...
2
votes
1answer
78 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 ...
1
vote
1answer
3k views
How to setup mod_rewrite/htaccess to do url masking and forwarding to a subdirectory?
Its been about three years since I've played with apache and php(I've been using thin and nignx ;). So I've forgotten how to setup a mod_rewrite directive to forward all http requests from root to the ...
