0
votes
1answer
17 views

How to use # in url as a redirect rule in htaccess for apache

I am having a difficult time figuring out how to have the following work: I am trying to redirect a url in htaccess I am trying to redirect from example.com/test.html to example.com/index#test I ...
-1
votes
1answer
16 views

IIS (or .htaccess) URL Rewrite not working correctly - need to capture number argument as query string

I'm trying to have: http://sub.domain.org/123456 become http://sub.domain.org/index.php?q=123456 I have tried many ways, and one way sort of worked, but then all subdirectories (including images) ...
-1
votes
0answers
7 views

URL rewrite on a whole website but not on some URIs [duplicate]

it seems very tricky to get some custom rewrite rules when url are already rewritten. I have some basics rewrite rules in a htaccess file in my website's root dir. RewriteEngine On RewriteBase / ...
0
votes
1answer
30 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
1answer
31 views

How can I rewrite from /page to /xx/page, using htaccess & apache only?

Hi I have found many resources on mod-rewrite and Apache but I haven't been successful of making a working example. The example below works for ✓ WORKS example.com/en/page1.php ☞ ...
0
votes
0answers
10 views

Setting up .htaccess with various pages and query vars

I am wanting to set up multiple rules, and so the system can be expanded I am wanting to use %{REQUEST_FILENAME} rather than having multiple rules set up. My structure at the moment is: ...
0
votes
0answers
45 views

Rewrite rule Mod_Proxy truncate file name

I search online for the solution, but nothing :(. I write this simple rule RewriteRule ^(.*)$ http://www.mysite.com/$1 [P,NE,QSA,L] In mysite.it i have an .htaccess with this rule and it's ok, but ...
1
vote
1answer
126 views

How to add rewrite rule for redirecting url in Apache Web Server

I am trying to configure autodiscover feature of outlook and thunderbird for my mail server. I have added a virtualhost entry with following rewrite rule to redirect config-v1.1.xml to ...
0
votes
1answer
62 views

.htaccess Rewrite Rule not rewriting alias

I am attempting to serve up a different robots.txt for alternate subdomains that I am using for domain sharding so that google doesn't index m1.example.com and m2.example.com. ...
-1
votes
1answer
56 views

Rewrite only if Image don't exists with .htaccess

How do I make RewriteCond+RewriteRule change site1.com/folder1 to site2.com/folder1, only if file in this directory don't exist. For example: site1.com/wp-content/uploads/2014/03/image.jpg If image ...
1
vote
1answer
111 views

Nginx htaccess rewrite specified folder

I tried to convert this htaccess rules to nginx: apache # Necessary to prevent problems when using a controller named "index" and having a root index.php # more here: ...
0
votes
0answers
90 views

Redirect only /index.php page and allow access to all sub directories

I'm running ExpressionEngine (www.mywebsite.com) as the root of my website and Magento in a sub directory (www.mywebsite.com/store) I'm trying to redirect the Magento homepage (and only the homepage) ...
1
vote
1answer
55 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... ...
0
votes
0answers
14 views

.htaccess rewrite sub directories as url query [duplicate]

I have .htaccess file in my root directory of the server. All the web pages in the server are in directories, like /Animal/Dog.php (the page can also be used without the extension). There are no ...
0
votes
1answer
60 views

activate htaccess only on specific URI

I have an apache webserver running on an ubuntu system. To avoid access for unauthorized users, I have an active .htaccess: AuthType Basic AuthName "own area" AuthUserFile /path/to/.htpasswd require ...
0
votes
1answer
125 views

Rewrite rules for Anchor CMS on Lighttpd

I installed Anchor CMS on my server running Lighttpd, and I am trying to setup pretty url's. I have anchor installed in a sub-directory "/blog". The htaccess file that works with anchor cms in ...
0
votes
1answer
49 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
36 views

Custom rewrite rule - migationg to WordPress CMS

I am trying to move my image gallery site from one CMS to Wordpress. On current CMS I have page with medium size image on it with URL: ...
0
votes
1answer
204 views

use .htaccess to change the url example.com/mobile to m.example.com

I have am setting up a social network script, it has both a desktop and a mobile version of the site. When a mobile device tries to browse the site, the mobile page is served with the url ...
1
vote
1answer
39 views

RewriteRule preserving path across environments [duplicate]

I'm trying to come up with some redirect rules that'll work on my local working directory and production. The problem being my local dev env works via "localhost/exp" where as the production works ...
1
vote
0answers
67 views

Request exceeded the limit of 100 internal redirects due to probable configuration error

This error only seems to happen to a few pages. Others will load just fine, some slower, but others will error out: # BEGIN WPSuperCache <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ...
0
votes
1answer
65 views

Trouble converting .htaccess rewrite rules for nginx

Hi all I am trying to convert the following .htaccess code <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
0answers
23 views

htaccess works fine on local but differently on remote

Hi I have an htaccess working fine on my local machine but when i upload it to my remote machine it works differently. RewriteEngine on RewriteCond %{REQUEST_URI} ...
0
votes
0answers
134 views

How to convert this .htaccess to Lighttpd?

I converted .htaccess below to Lighttpd but it doesn't work. What mistake did I make? You can find original .htaccess below, and the file I converted below it. Original .htaccess: RewriteEngine On ...
1
vote
0answers
88 views

How to rewrite using htaccess if the file exists in another folder?

We are trying to rewrite to another folder if the file does not exist in the document root, but does exist in the other folder. The other folder is in a completely different location, which is ...
0
votes
2answers
50 views

301 redirect from non www to www issue

I have been trying to set a 301 redirect from a non www to a www domain since yesterday but it only cause problems on my site. I first tried it from the control panel of the website, then by modifying ...
0
votes
1answer
85 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
0answers
48 views

htaccess Rewrite leading zero in url causing trouble

I have a database with a string column made up of four unique digits attached to each record. I know this isn't the best way to do this but I'm kind of stuck with it. I'm trying to rewrite urls from ...
1
vote
1answer
16 views

Rewrite Rule for modifying URL structure

I am trying to create a mod rewrite rule to correctly change an existing url structure that looks like this: Old: ...
0
votes
1answer
456 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
0answers
59 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
2answers
67 views

htaccess with multiple parameters

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !\.php$ RewriteRule ^(.*)/(.*)/(.*)$ $1.php?Action=$2&id=$3 RewriteRule ...
0
votes
2answers
3k 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
107 views

.htaccess URL rewrite to upper-case characters in domain

For example, I'd like to have foobar.com show FooBar.com This almost works, but ends up forcing a redirect loop: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?foobar.com\.com RewriteRule ^(.*)$ ...
0
votes
1answer
45 views

URL Rewrite http to https with www

I have a domain with several apps. All apps should be reached like this. https://www.website.com/app1/ https://www.website.com/app2/ https://www.website.com/app3/ The problem I'm having is with my ...
1
vote
0answers
25 views

How do I write this .htaccess rule?

I'm having trouble constructing a RewriteRule in .htaccess to redirect http://edgerank.net/%22%20%5Cl%20%22What-is-EdgeRank to the root of the domain I think the issue is that I'm not escaping ...
0
votes
2answers
609 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
189 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 ...
0
votes
2answers
70 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
57 views

Converting .htaccess to nginx

RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) p.php?id=$1 [L,QSA] How would I change that to work with nginx? Also, where do I place ...
1
vote
2answers
113 views

Using several rewrite rules .htaccess

I have a website wich is based on a searchpage, which shows a list, and next is a detail page of the items. if visitors use rootdomain.com/searchterm, should be redirected to ...
0
votes
1answer
46 views

How can I use Apache RewriteRules + PHP to determine which page to show?

I am trying to make a scalable RewriteRule on my .htaccess, I use each word before slash as a parameter. for example: http://localhost/mysite/param1/param2/param3/.../param20 I am working with this ...
0
votes
1answer
324 views

htaccess rewriterules for multiple pages with parameters

In main page index.php I have two href (like menu) for objective.php and news.php For both objectives and news I sent variables like: <a href="objectives.php?menu=corporate-objectives"> ...
1
vote
1answer
133 views

Redirect HTTPS to HTTP

The problem: I cannot get my site to redirect from https to http. OK, there are a number of solutions offered on this but none seem to be working for me. To establish a few things, I already have ...
0
votes
1answer
214 views

htaccess rewrite to remove url from path

Due to a previously misconfigured rewrite rule I have a whole lot of errors listed in webmaster tools like the following:- http://www.domain.com/www.domain.com/page.html ...
0
votes
1answer
78 views

Fixing mod_rewrite rule in Apache to apply only to one domain

I currently have <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ ^ezrahub.com/index.php/$1 [QSA,L] </IfModule> Which is ...
0
votes
2answers
173 views

simple nginx rewrite rule

I need to rewrite (convert) this basic htaccess rules to nginx format. Can you help me? Thanks. RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f ...
1
vote
2answers
170 views

RewriteRule only works if folder does not exist

Instead of directly accessing images, I need to use RewriteRule to redirect a set of images to be accessed via a script. A RewriteRule is used for it: RewriteRule ^Images/test/([^.\/]*)\.png ...
0
votes
1answer
91 views

Keeping Rewrite but allowing hotlinking in htaccess

Hiz I have already asked this question few days back but havent received any answer yet.so i am going to delete that and re ask here. I have this .htaccess rewrite rule which redirects/rewrites ...
1
vote
0answers
37 views

Static site to dynamic - rewrite loop

I have wordpress installed in a subdirectory of the root. I have followed the instructions provided to put index.php in root and create appropriate htaccess file. Site is up and running. Can access as ...