The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
20 views

Why is mod_rewrite doing this (only sometimes removing the base directory)?

I'm trying to redirect http://tonyfox.ws/fast/someresource.jpg requests to http://fast.tonyfox.ws/someresource.jpg. Here's the relevant bits from httpd.conf: <Directory "C:/xampplite/htdocs"> ...
0
votes
1answer
102 views

Using Nginx rewrite to change the shown URL from an IP?

I can't find any info on this so I don't know if it's even possible, but I was wondering: Can I use NGINX's rewrite module to change the displayed URL from, for example 123.123.123.123:6000/some/path, ...
1
vote
0answers
17 views

How to rename Webdav folder in another

In my server with apache and mod_dav have the following webdav rules in config Alias /admin_folder /var/www/test_site_cloud/web/admin_folder/files so I have /admin_folder mount. Now I need to ...
0
votes
0answers
13 views

Strip RewriteBase

I have a web server with a number of development sites. The underlying directory structure is : public_html |-bwa.kiwi | |-Documents | |-public_html | |-catalog | ...
1
vote
0answers
28 views

Rewrite without url changing

I would like to redirect (without url changing) from mysite.com/order/business to mysite.com/order/index.php?tariff=business I have this .htaccess: Options +FollowSymLinks RewriteEngine on ...
0
votes
1answer
90 views

.htaccess RewriteRule to redirect all to root

I would like to redirect every request to root by using RewriteRules in my .htaccess file (later on I will copy them to a vhost file). I tried something like this: RewriteRule ^(.*)$ http://test....
1
vote
0answers
67 views

Ubuntu 14.04 Nginx Rewrite rule issue

Problem with nginx mod rewrite. Really appreciate help. I spent hours on that issue Problem with rewriting url. I want rewrite from bangots.eu/?subtopic=highscores bangots.eu/?subtopic=houses to ...
0
votes
1answer
39 views

RewriteRule not redirecting to specified URL

Here is my rewrite rule: RewriteRule ^rest/v(?:[0-9.]+)/((?:[A-Za-z]+)/(?:[A-Za-z]+)(?:/(?:[A-Za-z0-9])+))?\.(json)$ https://localhost/rest/v1/index.php?url=$1&type=$2 [QSA,NC,L] It’s something ...
0
votes
1answer
182 views

Restrict access in apache except for one URL when using “master file” and mod_rewrite

I successfully applied basic authentication to my entire website but now I want to make an exception for a specific URL pattern. From what I understand, I can use the directive but so far, it isn't ...
0
votes
0answers
96 views

mod-rewrite redirecting all urls with parameters to new directory

What I want to rewrite: Old url: http://example.com/?id=tools to http://example.com/new_dir/?id=tools The new site in the root of example.com does not use the id parameter. I have tried to ...
0
votes
1answer
2k views

.htaccess file not running and internal server error

I am using ubuntu 14.04 and have LAMP environment. I have one of the project in dir /var/www/html/project1 . It can't access the .htaccess file for rewriting url rules. For that i have to change in /...
0
votes
1answer
10 views

apache2 RewriteEngine subfolder configuration is not wroking as expected. I am not sure how to correct it

The rewrite engine appears to be "functioning" but not as expected. Here is the dir tree of my public_html folder (serving using apache2 in my userdir) ┌─[admini@linuxbox][~/public_html] │ [13:16:45 ...
0
votes
2answers
2k views

Apache http to https redirect with Rewrite

Using Apache 2.4 on OS X Yosemite. Need to modify this virtual host for it to redirect http://server.kibana and http://www.server.kibana to https://server.kibana Here is the Vhost: <VirtualHost *:...
-1
votes
1answer
341 views

URL to filesystem mapping in Apache

I have a blog which is at mysite.tld/blog. Currently mysite.tld redirects to mysite.tld/blog via an index.php in the root. Apparently when I set this up two years back I could not get the .httaccess ...
1
vote
0answers
263 views

mod_rewrite path info postfix and per-dir prrefix

There's an issue with .htaccess configuration. I just need the url /category to match the category.php script, but when I try to open this url, there's a 404 error instead. Here's my .htaccess: ...
0
votes
1answer
369 views

Using Apache Httpd mod_rewrite to rewrite URL based on Accept request header?

I'm attempting to rewrite a URL based on the Accept header of the request. I saw in the docs that this seems to be possible, but I couldn't find any details or examples anywhere on how to go about it. ...
0
votes
1answer
135 views

Redirect from secure site to non-secure site with wildcard subdomain

I have the following set up in apache2.conf: <Directory /var/www/html> RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.|)mydomain\.com$ RewriteCond %{SERVER_PORT} !^443$ ...
1
vote
1answer
2k views

Cannot set up mod_rewrite with XAMPP

I'm trying to enable mod_rewrite on a XAMPP 5.6.3 installation. I've been following these guides: http://www.leonardaustin.com/blog/technical/enable-mod_rewrite-in-xampp/ http://www.lancelhoff.com/...
0
votes
1answer
16 views

Using Apache RewriteRule

I'm attempting to get a very simple RewriteRule working in Apache - I've set Apache2 up (in Vagrant) and run sudo a2enmod rewrite successfully (and restarted Apache after), with the following trivial ...
0
votes
0answers
168 views

The requested URL /fr/index.php was not found on this server Htaccess issus

I want to delete query string (fr) from my URI with htaccess rules, so I added this rule in the htacces file : RewriteRule ^((?!fr/).*)$ /fr/$1 [L,NC] But apache gives me this error: The requested ...
0
votes
0answers
321 views

mod_rewrite folder alias and hide original folder

I have a script in /script folder and I need to hide it from mydomain.com/script and make accessible from mydomain.com/secret . All must work with mod_rewrite (I can't rename the folder script to ...
0
votes
1answer
780 views

Reverse proxy 502 bad gateway

I have setup a subdomain to proxy my plesk panel, but when saving pages I am getting 502 Bad Gateway error instead of a completion message. I am running CentOS 6. Here is my vhost.conf configuration ...
0
votes
1answer
48 views

Redirect domain name

I have two domain names pointing to my server. I want them both to serve identical HTML. I thought I would just do the following, however, it was unsuccessful. Note that I eventually will want ssl ...
0
votes
2answers
89 views

apache mod rewrite - how to determine what file on disk is being hit?

A project that I am newly working on has been around for years, and it has managed to accumulate several hundred rather complex RewriteRules within the Apache conf files. When working with some files,...
2
votes
0answers
97 views

Keeping Firefox from adding “.html” to url

I've been messing with .htaccess for a while, and have the following rule: RewriteRule ^(mypage|myotherpage)/?$ main.php?p=$1 [L,QSA] If I enter http://mydomain.com/mypage/, it displays main.php as ...
0
votes
2answers
4k views

The requested URL xxx was not found on this server

I have been tearing my hair on this for hours..please help.. I have been running several websites on localhost for months without a hitch. Unfortunately last week I had do do a fresh instal of ...
1
vote
1answer
755 views

Uploadify with apache authentication

I'm trying to get a webapp working on my server. The app is using uploadify and that is the only part that I now can't get to work. I have a Alias to reach the app : (in /etc/apache2/conf.d/appalias) ...
0
votes
1answer
571 views

How do I write a rewrite rule for a virtual host in Apache?

I have a subversion server that is working fine; however, I bought a tool that requires that the project have a "branches" subdirectory an is case sensitive. The entire repository already has projects ...
0
votes
1answer
306 views

Block all referer request on Apache

I use my Apache server for a B2B application and I want to block all the referer requests like this one : [Tue Aug 13 14:23:05 2013] [error] [client 74.63.192.51] File does not exist: C:/Program ...
0
votes
0answers
58 views

How do I stop a Rewrite Rule from happening on my localhost IP?

I thought this would work but it just takes me to my live site RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.mydomain\.co.uk RewriteCond %{HTTP_HOST} !^127.0.0.1 RewriteRule (.*) http://www....
1
vote
0answers
326 views

apache rewrite to different domain subfolder without changing the address in browser url

Actually we have 2 sites. Site 1: Desktop version hosted in [http://mysite1.com] , using Apache server Site2: Mobile version of mysite.com is hosted in [http://mobilesites.com/mysite1mobile] , using ...
7
votes
1answer
12k views

Apache2 - Redirecting a subdomain to another URL

I have two subdomains, a.website.com and b.website.com, pointing to the same IP address. I want to redirect b.website.com to a.website.com:8080. I have this in my .htaccess file... RewriteEngine on ...
1
vote
1answer
3k views

Configuring Apache2 to Auto redirect calls to port 80 to port 443

I am running an Ubuntu 12.04 Server-based Apache2 server with SSL. I seem to have my configuration correct to achieve SSL connections over port 443, and at first, I did not even configure the server ...
1
vote
0answers
280 views

mod-rewrite rule not working properly for files in sub directories

I'm using the following rewrite url to get prettier urls: RewriteRule (\d+)/(.+) $2?companyId=$1 [NC,L,B,QSA,NE] The url /invoices.php?companyId=123 can for example be expressed as /123/invoices....
0
votes
1answer
1k views

.htaccess - subfolder URL Clearing

I don't seem to be able to do the following in my .htaccess I have my script in a sub-folder inside my root directory, let's call it "ecommerce", and inside that sub-folder I have my .htaccess. I Am ...
0
votes
4answers
2k views

.htaccess file mod rewrite in godaddy

i have a problem with .htaccess mod rewite in godaddy server. i have .htaccess file like # Options Options -Multiviews Options +FollowSymLinks RewriteEngine on RewriteRule index-hotel_in-(.*)\.htm$ ...
1
vote
0answers
138 views

.htaccess Not Working as Expected [closed]

I have a hosted account not linked to any domain at /~me. In this home directory I have a .htaccess file: Options +FollowSymlinks RewriteEngine on RewriteRule 123.html cgi-bin/example.php [nc] ...
1
vote
1answer
78 views

Is there a way to detect regular expression support in a htaccess file?

I use to following rewrite rule to pass the whole url to an php script: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*?)$ index.php?rewriteUrl=...
0
votes
0answers
186 views

mod_rewrite working but php pages not found or not recognized (downloaded instead of executed)

In regard to my first post mod_rewrite problems in sandbox: Mac OSX 10.6.6 Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l DAV/2 PHP/5.3.3 I am making progress but... Now the index.php page is not ...
1
vote
0answers
210 views

mod_rewrite problems in sandbox: Mac OSX 10.6.6 Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l DAV/2 PHP/5.3.3

greetings earthlings, I develop sites on a mac and have been trying to get mod_rewrite to work unsuccessfully. I have it working at my hosting provider just fine but really need it local to test/...
0
votes
1answer
318 views

Url rewrite rule [closed]

How to redirect a page form show.php?id=(15charstring) to show/(15charstring) I tried like this it is doing reverse means it is redirecting /show/(15chars) to show.php?id=(15chars) RewriteEngine on ...
2
votes
1answer
2k views

Apache mod_rewrite working with http but not https

I am configuring an apache server to change URLs from [http://(IP)/users/testuser/test.html] to [http:/(IP)/~testuser/test.html] This works fine, as such RewriteEngine On RewriteRule ^/users/(.*)$...
2
votes
1answer
4k views

htaccess how to redirect if all other rules fail?

htaccess has always given my problems. Every time I think I understand it, htaccess goes against what I just thought I understood. Any help would be GREATLY appreciated. What I want to do with ...
1
vote
1answer
724 views

apache - mod_rewrite + mod_proxy working in staging, not working in production ( [P] option ignored )

I have set up a redirect in my Apache virtual host serving several subdomains - call them a.example.com and b.example.com - serving a ruby on rails app. On my virtualhost config file I have this rule:...
2
votes
2answers
2k views

FireFox continues to redirect based on outdated httpd.conf rules (other browsers dont)

This is really odd, because it shouldn't be happening at all. When I access wellness.learnitlive.com on FireFox, I see it redirected to: http://www.learnitlive.com/classes-events/Health-Wellness/280....
2
votes
2answers
2k views

How to hide the PHP file extension using WampServer and .htacess file?

I just installed WampServer on Windows7 and uncommented mod_rewrite and set AllowOverride to All in the httpd.config file. I created an .htacess file and placed it in the root folder with the ...
1
vote
2answers
594 views

What does this mod_rewrite rule mean? [closed]

For some reason this rule is causing havoc in all subsequent rules (none of theme work). What does it mean exactly? RewriteRule . /index.php [L]
0
votes
2answers
149 views

Redirect all non www visitors to the www [closed]

I keep getting variations of the following answer, and it doesn't work RewriteCond %{HTTP_HOST} !^www.alwaysroaming.com$ RewriteRule ^(.*)$ http://www.alwaysroaming.com/$1 [R=301,L] The reason this ...