Directory-level configuration file found mostly on Apache web servers
0
votes
2answers
39 views
how to redirect from “https://www.example.com” to be “https://example.com”?
I want to know:
How to redirect from ..
https://www.example.com
to be
https://example.com
via .htaccess or CPanel?
As the SSL only installed on the one without "www", and when I visit the ...
0
votes
1answer
730 views
mod_rewrite “Request exceeded the limit of 10 internal redirects due to probable configuration error.”
What i want:
Force www [works]
Restrict access to .inc.php [works]
Force redirection of abc.php to /abc/
Removal of extension from url
Add a trailing slash if needed
old .htaccess :
Options ...
0
votes
2answers
21 views
How do I exclusively disable some Apache modules directives to be used in .htaccess
I'm a web hoster and a site owner.
As a hoster I wan't to disable the use of some module directives within the .htaccess for my customers sites.
Since some sites serves as a CDN, I want to disable ...
0
votes
1answer
13 views
.htaccess url “return url back to original url”
I'm a new to this site and I was wondering how do I have my url stay the same for example I have a url:
http://www.somesite.com/1234/a-b-c
And when some one adds extra info to the end of the url ...
0
votes
1answer
16 views
htaccess redirect based on cookies
I need a welcome page for new visits. If a user don0t have the cookie stored, he will be redirected to welcome page. If the cookie is stored, nothing happens.
Header set Set-Cookie "visited=true"
...
-1
votes
1answer
13 views
301 redirect help needed for urls with parameters
How do I 301 redirect all urls such as
http://domain.com/languages/italian/itemlist.feed?start=[0-9]&format=feed
http://domain.com/languages/italian/itemlist.feed?format=feed&type=rss
to
...
0
votes
2answers
38 views
htaccess redirect on first access
I'm using a 301 redirect on my htaccess file. I was wondering if it's possible to redirect users only on their first access and then show the site normally with a rewrite condition or something ...
2
votes
1answer
2k views
How to exclude a sub-folder from HTaccess RewriteRule
I have WordPress installed in my root directory, for which a RewriteRule is in place.
I need to password-protect a subfolder ("blue"), so I set the htaccess in that folder as such.
Problem is that ...
-2
votes
2answers
648 views
Have Apache Parse PHP in .html Files on Ubuntu [closed]
I installed Apache and PHP by:
sudo apt-get install apache2
sudo apt-get install php5
Then I created a .htaccess file in /var/www with:
AddHandler application/x-httpd-php5 .html
It parses PHP in ...
1
vote
0answers
28 views
Conflict with 3 different RewriteRules in .htaccess?
I'm using the below in my .htaccess file.
There 3 types of redirects:
redirect to directory /admin/index.php
redirect to specific .php files e.g. /about
redirect to user profile page from /John
...
-1
votes
0answers
25 views
Why sub domain not gives 404 error when wrong url entered?
I have create sub domain from cpanel and load my site files.
Now when i open proper URL:
e.g., http://sub.maindomain.com/
It works fine.
But when try with wrong URL it open default index page, but ...
0
votes
1answer
711 views
Set document root for external subdomain (A Record) via htaccess
I have a managed server (unable to control apache settings) with the default document root of: /var/www
I have a web app running in: /var/www/subdomains/app/webroot
I have a dedicated domain managed ...
0
votes
1answer
30 views
htaccess issue - 500 internal error
I have installed an app which has the following rewrite rule. It runs fine in a VPS setup - but in every shared hosting it is showing 500 error. The log is showing "bad delimiter" - I am completely ...
0
votes
2answers
32 views
How to do live.mywebsite.com => mywebsite.com/live via .htaccess?
I need to do the following thing
Mapping this subdomain live.mywebsite.com/something to mywebsite.com/live/something
for examples :
www.live.mywebsite.com/ ==> www.mywebsite.com/live/
...
0
votes
0answers
19 views
Correct rewrite rules from Apache to Nginx? [closed]
I'm having quite a difficult time translating some .htaccess rules to Nginx. My .htaccess codes are:
RewriteEngine on
Options -Indexes
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ ...
0
votes
1answer
716 views
Server error 500 when adding .htaccess file in the root folder
I read a lot of server error 500 questions related to the famous .htaccess file but I have still not found an answer to this error.
I have a folder which I used to test the .htaccess file.
...
3
votes
1answer
578 views
Apache sends plain-text response when accessing SSL-enabled site without HTTPS
I've never encountered something such as this before. I was attempting to simply redirect the page to the HTTPS version if it determined that HTTPS was off, but instead it's displaying an HTML page ...
1
vote
1answer
21 views
.htaccess rules cause infinite loop
I am trying to set up some .htaccess rules to stop my WordPress wp-login.php page being accessed from anyone outside of the UK (I keep getting hundreds of people daily trying to hack into it from ...
0
votes
2answers
31 views
How can I replace an apostrophe in a URL using htaccess?
I have a website with a search box on it. The search term is passed to the search page as part of the $_GET (I'm using PHP, but I think that's irrelevant to the problem I'm having), so my final url ...
-1
votes
0answers
29 views
Non-Port 80 Web Server & Pretty URLs [closed]
This is a "Blocked Port 80" related question, but maybe something a bit unique. I've yet to find a good answer. It's more academic than anything as I know running a production server at your house is ...
0
votes
2answers
100 views
htaccess file restrict to web folder
I have a webproject. Inside the web projects are several directories. I want only the web directory to be avilable to all.
I don't have access to change the vhost as this is for an internal intranet ...
1
vote
1answer
2k views
Helicon ISAPI Rewrite is processing Rewrite Rules for httpd.conf but not .htaccess
We have Helicon ISAPI Rewrite 3 installed on our Windows 2003 Web server. The RewriteRules work fine in the global file located in the httpd.conf file. The server serves several Web sites and we ...
0
votes
0answers
35 views
Stop .htaccess automatically influencing subfolders [migrated]
In my webhosting package, the primary domain points to the root of my file system and any extra domains that I add point to subfolders.
The problem is, the .htaccess for the primary is influencing ...
2
votes
2answers
851 views
URL Rewriting Problem
I'm trying to rewrite my URL's subdomain.
http://username.domain.com will show content of http://www.domain.com/user.php?u=username but URL stay as http://username.domain.com . (I mean url masking)
...
1
vote
1answer
22 views
why is my mod_rewrite redirect only working for the requested page and not it's necessary css, js files?
I'm trying my first steps with setting mod_rewrite to make the URLs of an application a little nicer.
I have a skinnable system, with skins being set through a query parameter, so any of the ...
0
votes
2answers
35 views
.htaccess and subdirectory control
If I add a master .htaccess to the root directory, what aspects get carried down to the sub-directories? Like do the settings in .htaccess carry down to /root/sub1/ and /root/sub2/.
I am wanting to ...
0
votes
1answer
33 views
.htaccess RewriteRule with cookies not working
The Joomla CMS Platform has an /administratotr/ folder which cannot be renamed. I'd like to secure it by requiring a custom url parameter to access it - I.E. /administrator/index.php?token=1149785380. ...
0
votes
1answer
24 views
htaccess subdomain Redirect issue
I am trying to build a wordpress site with mobile. I have set the sub-domain in httpd.conf and htaccess.
now i add some custom search in a e:\wp\custom\ folder, another mobile custom search in ...
3
votes
4answers
2k views
.htaccess RewriteCond for REMOTE_ADDR while behind Load Balancer?
I have a web server behind a load-balancer.
I need to add a conditional redirect to my .htaccess in order to display a maintenance page whenever we take the site offline for maintenance. This part is ...
1
vote
2answers
659 views
Apache2 & .htaccess : Apache ignoring AccessFile
Hi there here is my server configuration:
DEBIAN 32Bits / PHP 5 / Apache
Server version: Apache/2.2.3
- Server built: Mar 22 2008 09:29:10
The AccessFiles :
grep -ni AccessFileName *
...
0
votes
2answers
770 views
application/x-httpd-php opening rather than pages?
For some reason, no matter what page I try to open (.php, .html, .html, etc) my server trys to save it, rather than displaying the page. However, I do get the "It Works!" page for the main domain, ...
0
votes
2answers
43 views
.htaccess - complicated conditions
I've been trying to wrap my head around .htaccess for most of the weekend, but I keep stumbling; I can get the server to work with one set of rules, but no more than one at a time.
My application is ...
0
votes
1answer
29 views
Converting .htaccess to nginx rule
No matter what tools I try, it never works quite right.
I have an api, that is called at /api/v1/method.format?arg1=x&arg2=x
I have this .htaccess on /api/v1/:
RewriteEngine on
RewriteCond ...
1
vote
1answer
738 views
Redirect subdomain to subdomain on new domain
I own 2 domains sio-india.org and sio-india.com
What i want to do is redirect all the subdomains from 1st domain to 2nd domain. eg. home.sio-india.org to home.sio-india.com
but i dont want to ...
-1
votes
2answers
31 views
500 internal server error drupal clean url [closed]
I am using WAMP with Drupal 7. I enabled the mod_rewrite module in httpd.conf to enable clean url's in drupal however since then I am unable to run my website due to 500 internal server error. When ...
-2
votes
0answers
20 views
Internal Server Error on Centos Cpanel - changed .htaccess, got error, changed back, still getting error [closed]
I made a change to a perfectly normal .htaccess file which did not give problems, I got an internal server error, so I decided to change back the .htaccess backup, still got the error, then to test ...
0
votes
1answer
17 views
rewrite mod giving internal server error when trying to rewrite links
There is many questions discussing rewrite mod problems i have read them and none solved my unique problem, i already done 3 hour of research to solve it and still stuck.
i want to rewrite links in a ...
0
votes
2answers
35 views
Lighttpd: htaccess protection does not work
i have tried to setup an htaccess protection of an file from my website.
i have pasted the following code into the 05-auth.conf
$HTTP["url"] =~ "^/www/hosts/domain" {
auth.backend = "htpasswd"
...
0
votes
2answers
1k views
Change the document root of a parked domain?
I have run into a problem which is that my web host doesn't appear offer addon domains.
I currently have a domain name pointing to my name servers.
I went into cPanel to add an addon domain that ...
0
votes
2answers
1k views
.htaccess - Too many redirects
I am getting a "too many redirects" error from the following two .htaccess files.
.htaccess on domain 1
Redirect 301 / http://www.domain2.com/
.htaccess on domain 2
RewriteEngine On
RewriteBase /
...
3
votes
1answer
2k views
Handler for (null) returned invalid result code 70007 / causing error 500?
I am getting these errors on some pages in my site (php/apache/linux/mysql vps) on intervals and can't seem to find any reproducible scenario :
Handler for (null) returned invalid
result code ...
-1
votes
0answers
14 views
Secure folder and subfolders from directly opening from URL
I have file structure:
.htaccess
folder/
subfolder
I need that secure folder from directly opening from URL: http://site.com/folder, for this, in .htaccess file I have Options -Indexes
...
0
votes
1answer
29 views
Forward http to https expect one folder results in mod_rewrite error 310
My .htaccess
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=302,L]
RewriteCond %{SERVER_PORT} 443
RewriteCond %{REQUEST_URI} /docs/ [NC]
RewriteRule ^(.*)$ ...
0
votes
2answers
590 views
How to add iptables ip blocklists to Plesk 10.4.4 (CentOS)?
I'm trying to figure out the best way to add IP blocklists to my Plesk 10.4.4 server (CentOS). It's a simple Virtual Server I recently acquired through my hosting company.
I've used .htaccess files ...
0
votes
1answer
22 views
.htaccess redirect for all sub-directories and files
We have a subsite a domain.com/path/ad and I want to diredirect all of the traffic to a framework handler. domain.com/path/index.cfm
So far I have
RewriteRule ^$ index.cfm [QSA,NS]
RewriteCond ...
0
votes
1answer
49 views
Global Authority for Blacklisting IPs
I know that there are few common ways to block attacking IPs (such as deny in htaccess). Additional to that, we could get a huge list of IPs to block from misc sites such as :
...
-1
votes
0answers
13 views
Rewrite Rule for long page [duplicate]
does anyone can provide me the Rewrite Rule HTACCESS
to redirect user who access
www.domain.com/a/b/c/d/e (unlimited slash)
to www.domain.com/search.php?q=e (where e point to last page)
thanks
0
votes
1answer
679 views
Varnish / Apache redirecting to backend port 8080
I'm running Varnish 2 with Apache backend at 8080 on the same machine. Everything is working fine, except one problem: Sometimes Apache(?) is redirecting to backend port :8080 especially when I'm ...
0
votes
1answer
31 views
Understanding mod_rewrite syntax
When I write in .htaccess this mod_rewrite
RewriteEngine on
RewriteRule ^(.*)\.my_extension$ $1.php
and open url: site.com/index.my_extension this wroks fine, opened index.php
But when I am ...
0
votes
0answers
11 views
.htaccess allow/deny doesn't work with CloudFlare [duplicate]
.htacess contents:
Order Deny,Allow
Deny from all
Allow from localhost
Allow from 86.101.198.88 (my ip)
ErrorDocument 404 /block/?code=404
ErrorDocument 403 /block/?code=403
My hosting ...





