Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
0answers
176 views

Require domain alias to show in browser address bar

Similar to question posted here (but not related to sub directories): .htaccess redirect of domain name alias to main domain but must show up as the alias domain I am trying to direct traffic from an ...
0
votes
1answer
278 views

301 redirect conflicts with cname redirect for both naked and www URL

Client had created a cname redirect for their www url which goes to their new web address, they were told to create a 301 redirect for the naked url but it's conflicting with the cname and the www url ...
1
vote
1answer
405 views

.htaccess rewrite wildcard folder paths from host

My desired result is change a file to root / from a N number of paths. For example: www.host.com/a/b/c/e/f/g/images/1.jpg, where A~G is not always given. Result: www.host.com/images/1.jpg. This is ...
0
votes
0answers
185 views

Redirect using .htaccess for missing images

I have image file URLs getting generated by Drupal CMS as: ...file.pdf?itok=xbXNF I simply want to check till the .jpg part if it does not exist. If it does not exist then I want to do a 301 redirect ...
1
vote
1answer
113 views

.htaccess rewrite urls problem need help [closed]

I am always struggling to fix .htaccess files. Can't seem to get all variables parsed and rewritten. This is my URL structure: www.domain.com (index.php) www.domain.com/basisscholen/ ...
1
vote
1answer
177 views

Mobile traffic of my second site redirected to my base site [Edited,have a look] [closed]

I have a strange issue with my website and it seems i am unable to understand what cauese the problem.I would highly appreciate your help.The Scenario is I have two websites. Website A Website B ...
0
votes
0answers
230 views

URL rewriting on multiple domains hosted on one GoDaddy account

Note: I think this question has been asked before but no clear solutions have been discovered. I had developed a site in PHP that uses clean URLs: For example: www.example.com/about ...
0
votes
1answer
187 views

Keep current .htaccess file but add subdomain handler

Below is my current .htaccess file. I want to add a method by which I can conduct a simple pass-through if someone hits my subdomain. My current .htaccess is designed to grab any one who comes to my ...
0
votes
2answers
296 views

301 redirect all pages with a specific extension

I have a website that is not on ASP anymore, it's a Drupal 7 website now. I need to use an .htaccess file to redirect with code 301 all pages with .asp extension to the 404 page or a specific URL. ...
1
vote
1answer
101 views

Should limitstart=0 should be 301 redirected or have canonical tag to it

i have multiple categories with pagination. wherein limitstart=0 are there and is similar like category home page Wondering, should a 301 redirect through htaccess is advisable or shall i apply ...
1
vote
1answer
104 views

Is it worth to redirect images folder through .htaccess even if changes done in path to show on front end?

I am considering to move my images from folder site/userimages to subfolder site/images/userimages. The changes will be done in PHP files regarding the path change so that images do continue to show ...
2
votes
1answer
260 views

access-control-allow-origin not working?

I've seen similar questions asked here but I am still unable to solve this issue. I'm running Typekit and FontAwesome (from CDN) and I get the following error XMLHttpRequest cannot load ...
0
votes
1answer
196 views

htaccess redirect pages that don't exist

I have a website that has a little over 100 members. Each member gets a replicated website, and by default the software we use sets up their replicated website at a url like: domain.com/?username ...
1
vote
1answer
81 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 ...
3
votes
1answer
1k views

Clean URLs without PHP file extension

I want to make my URLs clean, for example: http://sample.com/about-me instead of: http://sample.com/about-me.php This is my code: RewriteEngine On RewriteBase / RewriteCond ...
0
votes
2answers
322 views

Does it make sense to throw a 404 error with PHP?

Problem Description Hi, The current setting of my .htaccess file does not allow any kind of 404 (as far as I know). I mean, it captures every kind of url like mysite.com/asfasfasf then sends it to ...
2
votes
2answers
245 views

How can I track clicks on various links pointing to same redirect using Google Analytics?

I'm doing a marketing campaign for an app where I'm targeting different schools. I want to know how many people have clicked on each link. The number of schools is pretty big, so I don't want to ...
2
votes
1answer
28 views

Ideal cache times for browser caching times for different file types?

I am trying to improve my site's performance - and that includes caching. I found some great caching via .htaccess from the boilerplate html5 template - but the cache times seem odd. Does anyone ...
0
votes
1answer
123 views

Is there an API or programmatic way to convert “.htaccess” rewrites to “web.config” IIS Rewrites?

I know I can do it in IIS Manager, but I am looking for some programmatic way to do it. We need to do this for customer all the time. So it would be great if there's a programmatic way of doing so.
1
vote
1answer
203 views

Is there any way to debug redirection rules in.htaccess?

I have an .htaccess file with over 200 redirection rules. It seems some of them are conflicting each other. Is there any way to find out which one is responsible of redirect on a particular request? ...
2
votes
1answer
277 views

Problem with my subdomain with .htaccess root as subdir

I am working on a site making my subdir to appear as root just like //domain.com/ is //domain.com/subdir and also access/load files hiding the subdir. My site have this .htaccess(below) and its ...
1
vote
1answer
147 views

Getting problem in removing end slash from directory

this is my code but i tried many ways but it is not working and i am not able to remove the end slash from the directory RewriteEngine On RewriteBase / # remove enter code here.php; use THE_REQUEST ...
1
vote
1answer
2k views

.htaccess redirect of domain name alias to main domain but must show up as the alias domain

I have the following in a .htaccess file: RewriteCond %{HTTP_HOST} ^www\.aliasdomain\.com$ [OR] RewriteCond %{HTTP_HOST} ^aliasdomain\.com$ RewriteRule ^(.*)$ ...
2
votes
2answers
1k views

Mod-rewrite rule broken after host upgrade to Apache 2.4

I use the following code on my site to remove php extension from links: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
1
vote
1answer
352 views

Why does this .htaccess loop?

if I try to redirect any page on a certain domain to one specific page (SEO does not matter, here), this ends in a loop - but I don't get why: RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteCond ...
1
vote
1answer
38 views

htaccess only works for one

I currently use the following htaccess code to remove php extensions and also allow the /index.php page to load without the word "index": RewriteRule ^$ index.php [L] RewriteCond %{REQUEST_FILENAME} ...
1
vote
1answer
179 views

Mod rewrite is not working or doing anything

So I've used an online .htaccess editor and it's not working for some reason on my test server, here's the content of my .htaccess file. RewriteEngine On RewriteRule ^Page/([^/]*)/$ /?Page=$1 [L] I ...
1
vote
2answers
122 views

One .htaccess file with rewrite rules for all domains

Our server is configured with multiple domains which reside in subfolders of the public_html folder. So domain1.com is located in /home/user/public_html/domain1.com and domain2.com is located in ...
2
votes
1answer
68 views

How to keep my site error-free after chaning my site's URLS?

My site is almost static. It has 64 pages. These pages before today were named with underscore. After checking my sites SEO with WooRank, the site advices me to change underscore links to dash links. ...
0
votes
1answer
104 views

Cyclic redirection in .htaccess

I have the following .htaccess file: AddDefaultCharset utf-8 RewriteEngine on Options +SymLinksIfOwnerMatch RewriteBase / # redirect all www-requests to no-www # - RewriteCond %{HTTP_HOST} ...
4
votes
2answers
184 views

One million redirects

What's the best way to redirect 1,000,000 unique URLs to another 1,000,000 unique URLs? These pages are all combinations of multiple search filters and queries. We're migrating the site to cleaner ...
0
votes
0answers
13 views

Is single page website bad for SEO? [duplicate]

Suppose I have a website for a company which I want to SEO. Think of two scenarios: 1) There is only index.php, and for /about /contact sections I do it like this: index.php?what=about , ...
1
vote
2answers
335 views

Google is indexing main domain despite 301 redirect to subdomain

I had applied 'redirect 301' from main domain to subdomain and Google had indexed sumbdomain (and links under it) for years. Now, for some reason Google has started indexing the main domain while ...
1
vote
0answers
182 views

Is my .htaccess rule creating an infinite loop?

Whenever I type a made up address that includes a directory index it removes it. The problem is when the the address includes a forbidden subdirectory. It reduces itself until it hits forbidden. How ...
3
votes
1answer
194 views

Site migration and SEO impact

I'd greatly appreciate a response on the following question relating to site migration and SEO impact. Here's some background on how my domain name and site is currently configured: My domain name ...
0
votes
0answers
32 views

Domain forwarding to new sub domain not working

I've a site www.xyz.org which I've migrated to xyz.newsite.org. It has been more than a month but Google is still showing www.xyz.org in the SERP. I've migrated another site exactly in the same way ...
1
vote
1answer
62 views

How to properly URL/domain forward

No clue on a title for this, someone feel free to suggest an edit. I have a client that has a website. He owns around 200 domains, and wants each domain to contain content from the main website. ...
1
vote
1answer
129 views

.htaccess file to implement multiple redirects

I have a dynamic site and from .htaccess file creating clean URLs: RewriteCond %{REQUEST_URI} !(\.png|\.jpg|\.gif|\.jpeg|\.bmp)$ RewriteRule ^([a-zA-Z0-9_\-\+\ ]+)$ flight.php?flights=$1&slug=$1 ...
0
votes
2answers
197 views

To Fix HTTP 400-499 error codes with 301 redirects in .htaccess file

This issue is on Wordpress site. I am aware we can change the URL naming convention in WP but i have changed my url format from date format to simple postname followed by slug as shown below. old ...
1
vote
1answer
124 views

mod_rewrite with .htaccess to make dynamic page search engine friendly

I am trying to make search engine friendly pages with .htaccess. The page look like /en/hotel.php?id=nice-hotel-7-patterson-street and I would like the page to look like this ...
3
votes
1answer
294 views

Blocking pages from being crawled with specific URL encoded parameters

While seeing the Google Webmaster Tools report there are certain URL encoded parameters like %5c and %22 coming up in URL's of site. We tried to identify the issue and observed that due to incorrect ...
2
votes
2answers
358 views

.htaccess file size causes 500 Internal Server Error [closed]

As soon as my .htaccess goes over approx 8410 bytes, I get a 500 Internal Server Error. I don't think this is due to a bad redirect, as I have experimented with redirects in the .htaccess and then ...
1
vote
2answers
198 views

SEO penalization after 301 redirect

A client asked to re-do his website entirely. After I finished, I uploaded the new website into a folder of the old one, so the new one is in www.oldwebsite.com/new/. The old has few pages, static ...
1
vote
2answers
353 views

Redirect incomplete URL to index page

I want to redirect specific URLs to the index page not to 404 error page (ex: http://www.website.com/trip-15). If I remove any character from the URL it will go to 404 error page (ex: ...
0
votes
1answer
42 views

Why would my new WordPress site require a 301 redirect?

I just finished moving a site from localhost to its final domain, and the thing is that the SEO guys is saying I need to make a "301 redirect" from the old site to the new one, but there is no such ...
1
vote
1answer
180 views

Getting the masked URL values in Mediawiki

I have successfully masked the URL in Mediawiki. By using the following scripts in .htaccess and localsettings.php files in Mediawiki, i.e.: .htaccess: Options +FollowSymLinks RewriteEngine on ...
1
vote
0answers
86 views

How can I mask sub-directory to work as DocumentRoot for multiple domains pointing to the same location?

I am trying to mask sub directories to effectively work as DocumentRoot for multiple domains. e.g. I have two domains - domain1.com & domain2.com both pointing to the same location. I want ...
0
votes
1answer
29 views

.htaccess Directory Redirect Problem

I want to redirect a directory to another directory but I've hit a snag. I want to redirect /directory_name to /new_directory_name so I put this in my .htaccess: RedirectMatch 301 ...
1
vote
2answers
10k views

Configure clean URLs using Laravel using a rewrite rule to index.php

Recently I've started learning Laravel , I have none experience with framework before. I'm encountering the following problem .I'm trying to configure the .htaccess file so I can have clean URLs but ...
0
votes
2answers
286 views

Pretending a file is in subdirectory with .htaccess

I have a web application, and it has a RESTful PHP backend that uses Zend framework (which does its own URL rewriting magic). The problem is, my backend's entry-page is api.php and the endpoints look ...