Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

3
votes
1answer
93 views

Moving a WordPress site to a new domain - need help with an Apache htaccess URL rewrite rule

I'm helping to move a WordPress site from one domain to another, which includes a change in permalink structure. I know I can use a .htaccess entry, but I'm not that well-versed (yet) in regular ...
0
votes
1answer
67 views

Remove Lots of index pages from google bot from same directory.

My question is about Google bot, seo and webmaster. may be this is not right place for ask, but if person not know so where he place his question he doesn't know!!! If you know my question's answer ...
1
vote
1answer
146 views

Rewrite rule for friendly URLs to index.php is not working from htaccess

Trying to get SEO Friendly URLs to work for my website using the following htaccess: RewriteBase / RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
1
vote
1answer
601 views

I get huge bandwidth transfer from some unknown bot Unknown robot (identified by 'bot*')

I get huge bandwidth transfer from some unknown bot Unknown robot (identified by 'bot*').There are ways to block it via htaccess or other means. The question is whether to block it for website safety ...
3
votes
1answer
195 views

Redirect www to non-www using Apache htaccess does not work

I have this in my .htaccess (modified from the default Drupal .htaccess): RewriteCond %{HTTP_HOST} ^www\.website.com\.com$ [NC] RewriteRule ^(.*)$ http://website.com/$1 [L,R=301] In theory this ...
2
votes
1answer
610 views

Apache htaccess results in files being downloaded instead of displayed

So I had this "beautiful" website that did exactly what I wanted it to do. Then I shut down my PC, reboot and...the pages just download now instead of being displayed. I re-installed XAMPP and ...
1
vote
2answers
160 views

Rewrite using .htaccess results in too many redirects

I'm currently creating a webpage which requires rewrites to look nice. The URL is: u.{my_site}/get.php?fid={ID}. The URL entered should be: u.{my_site}/{ID}. Because I'm bad (and new) at rewrite ...
1
vote
1answer
83 views

Redirect multiple files using .htaccess

I have a lot of files with a lot of sub directories which I moved one folder up, so, say, instead of example.com/cdn/folder/folder/file.html, it now looks like this ...
2
votes
1answer
99 views

What is correct syntax for .htaccess 301 redirect of query based URL to new URL?

I wish to set up some 301 redirects to new URLs and I am trying to do this with the redirect facility in cPanel. For some reason the requests are not being processed correctly and I am guessing that ...
3
votes
1answer
558 views

How can I redirect old WordPress URL (with a query string) to new URL using .htaccess?

I transferred my WordPress site to static HTML website, but some other website have a link to my old WordPress site mysite.com/?page_id=1103. I want to redirect all traffic to new URL which is ...
1
vote
1answer
104 views

URL is generating a /#!/splash-page

My site for some reason is generating a shebang - /#!/splash-page on the URL. For example when I type www.modernvintage1005.com, the browser returns www.modernvintage1005.com/#!/splash-page and every ...
0
votes
1answer
62 views

Possible to drop the original query parameters entirely in a rewritten URL?

Original URL looks something like domain.com/filename.php?id1=333&id2=444. Desired rewritten URL is something like domain.com/my-rewritten-url. I can imagine creating a lookup table with columns ...
1
vote
3answers
79 views

Can secret URLs be used to protect files?

I would like to know if I can offer private downloads in my website (only available to certain users) by placing all the files in a /download folder and make sure it doesn't show the index of all the ...
1
vote
1answer
49 views

Configure htaccess to show index.php as the default page instead of permissions error

Having a problem with my .htaccess. I have this to secure all my documents: Order Deny,Allow Deny from all Allow from 127.0.0.1 <FilesMatch "\.(htm|html|css|js|php)$"> Order Allow,Deny ...
0
votes
2answers
83 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 ...
0
votes
1answer
98 views

Perl script rendered in browser as code through symlink - fine when accessed directly

I have a Rails 4 app that has some views that post to Perl cgi scripts. The perl scripts are accessed via a symbolic link to a folder called "cgi-bin". When I navigate to a perl script through the ...
0
votes
1answer
46 views

Webserver insists on opening “blog1.php” instead of “index.php”

I'm at my wits' end. I have just ripped out a website and in the process of rebuilding everything. Previously, the 'home page' of the website is a blog, with the address ...
1
vote
1answer
327 views

How to configure mod_bwlimited through htaccess

The mod_bwlimited module in htaccess apparently displays an error if bandwidth is exceeded. Anyone know what options are available for configuring it through htaccess?
0
votes
0answers
28 views

Restricting A Directory Through .htaccess

I'm trying to put all of my FTP accounts into a folder on /public_html/ftp and password protect it so search bots can't crawl their private files. I'm also trying to redirect all site traffic from the ...
2
votes
3answers
120 views

Different authentication for HTTP POST and GET requests in Apache

I want to authenticate for POST requests for http://path/to/logical/abc.xml (but not GET requests to that URL). How do I put constraints like this in place? The paths are logical and location ...
2
votes
1answer
173 views

Restricting post method and authentication to specifc URL paths in Apache .htaccess

I shall start with an example. I want to restrict to POST requests only for http://path/to/logical/abc.xml and restrict to GET only for http://path/to/logical/def.xml. How do I put constraints like ...
0
votes
1answer
38 views

.htaccess 301 Redirect [duplicate]

How do I make it so all traffic is directed for the entire site and all subdirectories from non-www to www Here is my .htaccess contents: RewriteEngine on <IfModule mod_suphp.c> ...
1
vote
1answer
87 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 ...
0
votes
1answer
264 views

Using Apache's rewrite module to set up local host names for development

I have several websites on my development machine under Apache's htdocs folder. Apache Directory root is htdocs, but I want to be able to access each different site there by individual domain names. ...
0
votes
2answers
58 views

htaccess 301 redirect for payment page

I have a client who currently runs a venue and has ticket purchases made available through a third party. The way the site currently works is that there is a standard href in the nav menu to the ...
1
vote
2answers
3k 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 ...
2
votes
2answers
142 views

Replacing an existing website – SEO considerations for broken links?

I have built a new website to replace a client's existing company website on the same URL. The content is entirely different, and none of the page links are the same. Do I have any issues to worry ...
0
votes
1answer
197 views

Password protecting dynamic URLs in Apache

I am handling many logical files request using the Apache server. To make the path simple I have used mod_rewrite in the httpd.conf. Now I am planning to enforce authentication on these logical file ...
2
votes
2answers
98 views

301 redirects and non-existent directories

I just wanted to clarify something; my boss often messes up and tells a customer to go to a specific directory; i.e. mysite.co.uk/directory/ instead of the actual correct URL ...
0
votes
2answers
126 views

prevent access via .htaccess *TO* a given hostname

I have a website which is accessible via several hostnames. I would like to put something in an .htaccess file that would simply block any request requesting a particular hostname. For example, say ...
1
vote
1answer
109 views

How to set up a single IP blocklist for multiple sites hosted on the same account

When running multiple sites on the same hosting account, one might find that an attacker has attempted to breach one site. A webmaster may want to block the IP address from all sites hosted in the ...
1
vote
0answers
165 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
250 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
370 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
174 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
110 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
227 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
180 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
280 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
96 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
103 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
257 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
190 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
306 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
227 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
0answers
17 views

Creating custom file endings for webpages - .php - .html - .rb ect [duplicate]

I was looking through the dafont.com site and noticed that for their individual font pages they have the file ending .font ie. http://www.dafont.com/chopin-script.font how have they done this, as ...