-1
votes
1answer
18 views

Mod rewrite htaccess worked on old server, not on new server

I have the following .htaccess file, which worked fine on my old host. I moved over to an AWS instance (Ubuntu 12.04 LTS), and it's no longer completely working: <IfModule mod_rewrite.c> ...
-1
votes
0answers
15 views

How should I write a mod rewrite rule to map a file to a url [duplicate]

I'm in the process of migrating an established ASPX site to PHP. I'd already made the move from ASP to ASPX before my client asked me to take over the hosting. The ASP and ASPX pages are linked to ...
1
vote
1answer
15 views

apache change proxy request url rewrite

I have problem with proxy requests. I need to enable apache mod_proxy for my subdomains but i forgot to set Allow from mydomain.com, it was Allow from all...Yes, i created open proxy for all world... ...
-1
votes
1answer
18 views

apache disable unconfigured subdomains [duplicate]

There is a webserver which has example.com, www.example.com, my.example.com, shop.example.com, static.example.com. All sites except www.example.com is on https. My problem is when I type ...
0
votes
0answers
16 views

RewriteBase in httpd.conf + RewriteRule in .htaccess? [duplicate]

RewriteBase is set in httpd.conf for an alias: Alias /test /home/user/test <Directory "/home/user/test"> AllowOverride All Allow from All RewriteEngine On RewriteBase /test ...
-1
votes
1answer
21 views

Block Wildcard User-agent

how can i write rewrite condition for wildcard user agents here is the code I'm trying but doesnt work RewriteCond %{HTTP_USER_AGENT} !*uTorrent* [NC] RewriteCond %{HTTP_USER_AGENT} ...
-1
votes
1answer
31 views

Apache htaccess get subdomain and prepend it to path [duplicate]

this is my first question on ServerFault and I think I couldn't find a similar one. To the point. I would like to achieve the following using my .htaccess. subdomaina.example.com/stats/ -> ...
0
votes
1answer
35 views

convert lighttpd to nginx rewrite rules

I'm trying hard to make my code work on nginx. This configuration works with lighttpd but I want migrate it to nginx. Rewrite rules on lighttd : url.rewrite-once = ( "^/(ui)/(.*)$" => ...
0
votes
1answer
27 views

301 permanent redirection changing URL structure [duplicate]

I changed category urls on site. Old are like this: www.example-name.com/category-name-exactly-same-keywords/ ...
0
votes
0answers
34 views

Mod-Rewrite - going from plain url to one with special characters

I am having a little issue with FreeBSD 10 RELEASE and Mod_Rewrite when it comes to special characters -- not in the source URL, but in the destination URL. The vast majority of Mod_Rewrites that I ...
0
votes
1answer
36 views

404 returned though rewrite rule is matched

I have one rewrite rule that sends all requests to index.php: RewriteRule ^.*$ index.php [NC,L] (Apart from RewriteEngine On, that's all there is in the .htaccess file) It works, unless the ...
0
votes
0answers
26 views

After migrating to Plesk 11 / Apache 2.2.15, some rewrite rules ignored [duplicate]

First, thanks in advance for any insight. We recently migrated to Plesk 11 / Apache 2.2.15. After doing so a number of our rewrite rules no longer work as expected. For example, this no longer ...
0
votes
2answers
48 views

getting started with apache mod_rewrite on a virtual host [duplicate]

hey SO I am attempting to use apache's mod_rewrite module to do some basic rewrting of url on my website so they become a little more seo friendly basically I have a virtual host file that look ...
0
votes
1answer
24 views

Rewrite a directory to another directory without a redirect [duplicate]

I have the following rewrite rule: RewriteRule ^support/(.*)$ /blog/support/$1 [R=301,NC,L] However, all it does is a simple redirect. What I want to is for /support to show the contents of ...
1
vote
4answers
86 views

HTTPS / HTTP mod_rewrite rules, strange interaction with subsequent CMS index.php rewrite

With the below rewrites in htaccess, as expected, this HTTPS request is not rewritten: https://example.com/system/anything is not re-written to http://example.com/system/anything But, ...
1
vote
2answers
71 views

Apache2 mod_rewrite failing for non-existent sub directories [duplicate]

An even shorter version of my .htaccess file (Last RewriteCond wasn't there) use to work perfectly on my shared web hosting but I've moved to a VPS with Ubuntu 12 with it's stock Apache2 but it simply ...
1
vote
2answers
125 views

Amazon EC2 .htaccess and 500 Error

I have an Amazon EC2 (amzn-ami-pv-2013.09.0.x86_64-ebs (ami-149f7863)) on which I installed Apache, PHP and MySQL. All works fine until I try to activate .htaccess. I change AllOverride All in ...
0
votes
1answer
53 views

Need Corrected htaccess File

I'm attempting to use a wordpress plugin called WP Fast Cache which creates static html files from all your posts, pages and categories. It creates the following directory structure inside ...
1
vote
2answers
144 views

Virtual Host Configuration and mod_rewrite - Removing PHP Extension and Adding Forward Slash

On my production server, things are fine: PHP extension removal and trailing slash rules are in place in my .htaccess file. But locally, this isn't working (well, partially, anyway). I'm running ...
5
votes
1answer
86 views

How to minimise effect of mischievous, persistent POST requests

For a few months now one of our shared hosting servers has been persistently and constantly hammered by "POST /" requests from what must be hundreds of thousands of individual IPs. On a number of ...
-4
votes
1answer
83 views

How to change .htaccess file to work right in localhost? [closed]

I have this snippet code in my .htaccess file to prevent users from hotlinking the server's images: RewriteEngine On RewriteCond %{HTTP_REFERER} ^$ [OR] RewriteCond %{HTTP_REFERER} ...
0
votes
1answer
36 views

Apache .htaccess rewrite php to js and execute js file as php script

I have the folowing rewrite rule in my .htaccess file RewriteRule ^js_([A-Za-z0-9\.\_\-]{1,50})\.php$ libjs/misc/$1.js so js_messages.php url links to libjs/misc/messages.js file It's working ...
0
votes
1answer
48 views

htaccess rewrite condition old site to new site with querystring

I am not even going to pretend to fully understand how htaccess rewrite conditions work. I've been working on this for a while searching and searching. I have an old Wordpress site www.old-site.com ...
0
votes
0answers
91 views

Rewrite URL and keep POST data

We recently setup SVN for our web development. We'd like to be able to browse different branches/tags/trunk based on the URL you input on our dev server. So, for example, ...
0
votes
1answer
60 views

Server remembering old rewrite rules, even when I remove htaccess

I have set up a development server with Ubuntu and LAMP, but for some reason the .htaccess is acting strange... There is a site on there with a set of rules, when I comment them out they still work, ...
0
votes
1answer
71 views

Trouble configuring virtual host to allow standard wordpress mod_rewrite for permalinks

I'm having a little trouble getting the standard mod_rewrite that wordpress generates in my directorys .htaccess file to work correctly. The server I'm using has a virtual host set up on it by ...
1
vote
2answers
112 views

Request exceeded the limit of 10 internal redirects

so here is the error [Mon Sep 30 00:09:53 2013] [error] [client 66.249.66.205] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' ...
0
votes
2answers
61 views

Mod Rewrite appends Document root in rewrite rules

Previously my host provider gave an option of setting up rewrite rules in apache configuration files. At that time below rule worked fine. # Non WWW URLs to WWW URLs RewriteCond %{HTTP_HOST} ...
-1
votes
1answer
36 views

Apache Hotlink Prevention not Working

I have been trying to prevent hotlinking of images on a domain of mine without any success. I have added the following to /etc/apache2/httpd.conf RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ ...
0
votes
0answers
17 views

htaccess go up a folder, above web root

I've been looking around on the internet, but i couldn't find a good answer to this question. Since i'm very new to htaccess, i would like to know how you would solve this problem. On my site, a user ...
1
vote
1answer
102 views

htaccess RewriteRule force end of execution Apache 2.2

Hi I have written some rewrites, but from what I can tell from the logs it seems that the rules keep executing and so, although the correct result is achieved mid-execution, the final rewrite is ...
0
votes
1answer
166 views

RewriteBase rule works in .htacess, but not in httpd.conf (inside <Directory …>)?

Let me explain by example... File: /var/www/example.com/public/wp-content/cache/minify/.htaccess <IfModule mod_rewrite.c> # THIS WORKS... RewriteBase /wp-content/cache/minify/ ...
0
votes
1answer
54 views

htaccess rules unexpectedly forcing download of gzipped index.html [duplicate]

I'm trying to set up SSL on a Wordpress site. The SSL certificate does not cover both www. and non-www. versions of the URL, so I'm trying to simply redirect everything to https://domain.tld with ...
-3
votes
2answers
60 views

Mod Rewrite code with out changing the url in address bar

I When I call http://www.mysite.in/abc/xyz it shoud show up http://www.mysite.in/abc/xyz/index.php but the url shout not change in address bar and it should work with out "/" in the address. Please ...
-1
votes
2answers
74 views

Website link with out “/” [duplicate]

My Apache 2.2 is running on port "8080" I want to call my site url http://www.example.in:8080/abc/xyz.html/index.php (xyz.html is a folder) as .... http://www.example.in:8080/abc/xyz.html Can ...
0
votes
1answer
99 views

How to rewrite /index.php to /app.php [duplicate]

I have this in my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteEngine On ...
-1
votes
1answer
26 views

redirect / to /?C=N;O=A [duplicate]

I want to be able to use IndexOrderDefault Descending Date for all of my sub-folders, but I want to the first page to be sorted by name (A-Z) I read ...
0
votes
1answer
71 views

redirect a directory to a new domain without touching the main website

I would like to redirect https://mineyourmind.de/forum to https://mineyourmind.net/forum . Every rewrite rule I could google didn´t work, they also redirected the main domain (mineyourmind.de). Im ...
0
votes
0answers
47 views

How do you exlcude a sub-directory from an Apache rewrite ruleset?

I have a multilingual site with the root being English and a sub-directory (/es/) being a human translation into Spanish. Instead of manually updating all URLs, I have a opted to use mod_rewrite to ...
1
vote
0answers
91 views

htaccess, errordocument and joomla rewrite

I need to setup a 404 error handling in my .htaccess, besides handling some 301 redirects for the links of an old website. The new site is made with Joomla, the old site was written in asp. Sef urls ...
0
votes
1answer
39 views

add word in url using .httaccess

Right now i am accessing abc.xml from test directory as below http://localhost/test/abc.xml I want to redirect the above url as below http://localhost/test/test.php?abc.xml ...
0
votes
1answer
30 views

Inspecting apache mod_rewrite

I want to do something simple with apache mod_rewrite. And guess what, it doesn't work. Had I been in a "sane" environment, maybe I would get an error and a stack trace. Or maybe I could use a ...
0
votes
0answers
43 views

unidentified redirect based on the referer

My client has a problem with a redirect. When there's an external link pointing to his website, this link gets redirected by the server back to the referer. $ curl -i -H "Referer: ...
0
votes
2answers
2k views

Removing php extension with .htaccess does not work

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

Issue with mod rewites in htaccess on Apache

I am using a private host, linux php, where the htaccess just does not act like it does with the bigger famous top 10 hosts etc. redirect 301 /pagea.html /pageb.html Causes a 500 internal error on ...
0
votes
3answers
43 views

RewriteRule doesnt work

I want to convert this url http://ts.thebenamorgroup.com/g2g/category.php?cate=mens to: http://ts.thebenamorgroup.com/g2g/category/cate/mens/ I have this rule but it doesnt work: Options ...
0
votes
1answer
177 views

Mod_rewrite issue with godaddy web hosting

Am trying to use laravel to build a site but my routes all redirect to the homepage. Apache error logs show this AH00124: Request exceeded the limit of 10 internal redirects due to probable ...
1
vote
1answer
422 views

.htaccess ignored, SPECIFIC to EC2 - not the usual suspects

I run 8-10 EC2 based web servers, so my experience is many hours, but is limited to CentOS; specifically Amazon's distribution. I'm installing Apache using yum, so therefore getting Amazon's default ...
0
votes
2answers
503 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
0
votes
1answer
85 views

mod_rewrite some rewriterules not triggering

I am setting up an htaccess file to use some seo friendly urls instead of pointing directly to php files. I have used this method plenty before but this is my first time doing it on a rackspace server ...