1
vote
0answers
40 views

Two stage Apache rewrite not working

I had a list of "Redirect permanent path/to/url1 http--//domain2.com/path/to/url2" rules working as a test, but when I attempted to couple them with mod_rewrite rules to catch non-matching domain1 url ...
1
vote
1answer
91 views

Rewrite URLs not working - wrong method or conflict?

I've been at this for about an hour now and I'm not having much luck. htaccess files are quite new to me, so I'm obviously doing something very wrong. Current htaccess content, which I need to keep: ...
3
votes
1answer
474 views

Using .htaccess to set a cookie and 301 redirect

I currently have in my .htaccess: RewriteRule ^$ http://chfmaine.com/ [CO=moved:yes:chfmaine.com:1/,R=301,NE,NC,L] I was basing this off of this post. That's a lot more than I need but the setting ...
0
votes
2answers
72 views

The number of soft 404 errors is increasing because of redirects to the home page

I have an increase in soft 404 errors. Using Apache in my .htaccess file I have: Redirect 301 /test.html‎ /page/pop/test Redirect 301 /about.html‎ /about I have also tried: Redirect 301 ...
1
vote
1answer
67 views

Would phpBB break if I move it from one folder to another? Can I use mod_rewrite to redirect requests for that forum from old folder to new one?

Please note that I have installed dynamic web pages (PHP) in the directory *public_html/old/* in order to create the web site www.example.com. Actually I have created a PHPBB forum and thus the URL of ...
1
vote
2answers
1k views

.htaccess language redirects with SEO-friendly URLs

How do I setup my .htaccess file to detect several languages, and redirect them to specific SEO-friendly URLs? Basically every URL needs to go to index.php?lang=(...). So, for English language ...
1
vote
1answer
127 views

What's wrong with my mod rewrite for GEOIP based on location?

I'm a bit of a newb in modrewrite but used it successfully on my server before. I successful installed the module on my apache server and tested out with PHP test page(it correctly returned my area ...
1
vote
1answer
77 views

.htaccess problems with redirection

I apologize ahead of time that this might be a common question, however I've spent 3-4 hours already on solutions which don't quite fix the problem. I have a site and it is moving to a different ...
1
vote
1answer
54 views

Redirecting previous domain subfolder links

I've recently bought a domain that was unregistered. After looking in Google webmaster tools, Google is trying to crawl random pages that don't exist. Turns out it did have a previous owner. The ...
2
votes
2answers
45 views

Need to remove www for only one sub directory from a domain

I have a domain like www.example.com. I need to remove www. from specified sub folder by using a .htaccess file. Example : www.example.com/blog should redirect to example.com All other sub ...
2
votes
1answer
335 views

How do I map a (keyword rich) domain name to an existing website?

I am not experienced technical person, and still learning but will try to explain what I have done so far and what my query is. I have a (hypothetical) domain az-studios.com On that domain I have 3 ...
2
votes
0answers
439 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
2answers
294 views

HTACCESS Wildcard Subdomain forward to Domain

I know this may seem like a duplicate, but I am unable to find a solution. Is it possible to setup wildcard subdomains with htaccess? I have an example of http://test.domain.ca I need to forward ...
1
vote
2answers
237 views

How do I redirect www and non but not IP

I am trying to redirect www.domain.com or domain.com to www.domain.com/temp.html I am using the following code: RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^/?$ ...
1
vote
2answers
783 views

How to redirect a website from a folder to the root folder?

I was running a website on a folder (www.example.com/folder). The new version of the website is live and runs on the root folder. How should I redirect users who visit the website using the old URLs ...
0
votes
1answer
943 views

Link to pages on site without .html extension appearing in browser?

I've modified my .htaccess file to allow access to html files without having to include the extension on the end, for example: www.mysite.com/document directs to www.mysite.com/document.html ...
1
vote
2answers
325 views

WordPress mod_rewrite redirect specific folders

As a new user, I'm not allowed to post more than two hyperlinks here. So I have added a space after every http (ignore them and read as full URLs). System: Debian Etch, Apache 2.2 I have a WordPress ...
0
votes
1answer
382 views

short and friendly URL for affiliate links

This is my first question here on Pro Webmaster... I'm really glad to be here! I believe this question will have a simple answer but I'm starting with htaccess and I want to learn something about ...
0
votes
2answers
2k views

.htaccess rewrite www to non-www and remove .html

I need rewrite rules to redirect the following: http://www. to http:// /file.html to /file I've tried using a combination of these but each time it results in a redirect loop on one of the ...
1
vote
3answers
625 views

What's wrong with my htaccess ? (500 Error)

I've written a small htaccess file to redirect Internet Explorer users to a specific page Here are the contents : # MS Internet Explorer - Mozilla v4 RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ...
5
votes
2answers
915 views

Redirect/rewrite dynamic URL to sub-domain and create DNS for subdomain

I have created an application in PHP, I would like to re-direct the following URL to corresponding sub-domain. Dynamic URL pattern: http://mydomain.com/mypage.php?user_name=testuser I wish to ...
4
votes
2answers
358 views

Case-specific mod rewrite on WordPress subdomain multisite

I have split a WordPress blog into multiple category-specific blogs using subdomains, as the topics in the original blog were too broad to be lumped together effectively. Posts were exported from the ...
-1
votes
2answers
2k views

Having trouble redirecting old product sites and categories to new pages

I recently upgraded a shopsystem to prestashop and imported the previous products (~1200), and I managed to keep the old category_id and product_id. I'm trying to set up those 2 rules to redirect all ...
2
votes
1answer
220 views

Optimal way to implement very big redirect list in Apache2

I have about 6000 URLs that need to be redirected after changing the CMS. All those URLs are stored in a DB table together with an ID that allows me to tell what is being referenced. Using this table ...
1
vote
2answers
110 views

URL rewrite to fix broken links into a subdirectory — subdirectory was moved to the root directory

I had an e-commerce website hosted on http://mydomain.com/beta for more than a year, eventually I decided to move the website to root http://mydomain.com I had done quite a lot of link postings to ...
1
vote
1answer
44 views

Tricky mod_rewrite challenge

I list about 9,000 records on my little site. At the moment I'm showing them with a dynamic page, like http://domain.com/records.php?id=019031 But I'd like to start using meaningful URLs like this ...
1
vote
1answer
181 views

Apache Redirect based on directory name

I'm trying to use one install of Kohana to manage two separate sites rather than just duplicate the install. I have directories like this: applications/ app1/ app2/ The .htaccess I have ...
1
vote
1answer
5k 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 ...
2
votes
2answers
1k views

How can I redirect everything but the index as 410?

Our site shut down and we need to give a 410 redirect to the users. We have a small one-page replacement site set up in the same domain and a custom 410 error page. We'd like to have it so that all ...
0
votes
2answers
84 views

RewriteRules targeting a directory result in a gratuitous redirect

I have a standard CMS-like RewriteRule set up in my .htaccess: RewriteRule ^(.+)$ index.php?slug=$1 Let's say I have a directory called "foo" in the root directory. For some reason, if you hit the ...
8
votes
3answers
2k views

Forcing SSL and www in .htaccess

I'm looking for a way to force SSL and www. I've been able to force both separately but together I keep running into redirection issues. The following code works when handling a URL in this format: ...
3
votes
1answer
387 views

subdomains apache rewrite rules

Let's say I have my web folder as public_html. In there I have a sub folder. I can view the folder at: www.mydomain.com/sub & mydomain.com/sub What I want is: sub.mydomain.com This will show ...
2
votes
4answers
143 views

Question about mod_rewrite rule for redirecting failing pages

I'm setting up a mod_rewrite rule that redirects failing pages to a custom "Page Not Found" page. This is with WordPress. I've used an online tutorial from the Apache site and so far my rules look ...