Hi,
I am new to Apache but I have requirement as follows.
if the url is http://images/data1/templates/[rest of the url path] it should redirect to http:/172.20.224.23/templates/[rest of the url path]
if the url doesn't have "data1/templates" (mean http://images/[anyuri]) it should redirect to http://images:8080/[rest of the url path].
I tried as below
It is all the time redirecting to http://images:8080/[rest of the url path].
If i comment out "RewriteRule ^/(.*) http://images:8080/$1 [L] " then i am getting the error "File does not exist: " in htdocs folder.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
For this type of rewrite rules, I recommend you place it in the .htaccess file in the appropriate directory or directories and not in your virtual host configuration.
Hi,
Googled around but I couldn't find anything similar. I'm looking to do the following in apache..
if a user comes into the following URL.
http://www.example.com/some/thing.cid?wholebunch_of_stuff_here
keep the URL exactly as is BUT add &something at the very end of it.
thanks in... (1 Reply)
Hi,
Looking for a shell script to redirect the below URLS...
1) http://domain.site.com/exmp/http://www.example.com/ofxm/supp/un_headfoot?un_head=yes redirects to http://domain.site.com/header.html
2) http://domain.site.com/exmp/http://www.example.com/ofxm/supp/un_headfoot?un_foot=yes... (4 Replies)
Could you help me to write nginx rewite rules for activecampaign at present they only have a apache rewrite rules which to be put in .htaccess
cat .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# KB
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}... (0 Replies)
Hi All,
I want to redirect from http://localhost/abc/xyz/def?cc=dk&lc=da
to http://localhost/abc/mnc/pdf?cc=dk&lc=da.
Please suggest a rewrite rule. (0 Replies)
Hey!
Does anyone know how to create rewrite rules to change:
“link.html?hl=en” to “/en/link.html”
“link.html?hl=jp” to “/jp/link.html”
“link.html?hl=es” to “/es/link.html”
etc?
Where "link.html" changes based on the page request? (2 Replies)
Hello.
I have scenario where a Client send request to Server1.
Server1 send request to Server2.
Request are xmlHTTPRequest - need to get data (XML) from Server2 back to client.
Trying to use APACHE proxy...
Anyone can help?
What to download / configure / ...?
Thank you for your... (2 Replies)
Hello.
I have scenario where a Client send request to Server1.
Server1 send request to Server2.
Request are xmlHTTPRequest - need to get data (XML) from Server2 back to client.
Trying to use APACHE proxy...
Anyone can help?
What to download / configure / ...?
Thank you for your help. (1 Reply)
I am trying to write RewriteRule on Apache_1.3.26 to get users web page from another server.
for example if users tries to get web page on
www.somedomain.com/~usersname
it will get the web page from www.testdomain.com/~username without redirect and users will not be aware of any redirect... (1 Reply)