473,513 Members | 3,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

htaccess RewriteRule with {HTTP_HOST} and {REQUEST_URI}

ghasembaghi
1 New Member
i look for a RewriteRule from:
Expand|Select|Wrap|Line Numbers
  1. http://example.com/SampleURL
  2.  
to
Expand|Select|Wrap|Line Numbers
  1. http://example.com/index.php?Domain=example.com&URL=SampleURL
please help me
Mar 29 '13 #1
0 1050

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3678
by: Nel | last post by:
Just looking for some general advice on modifying the URL for php. I am using .htaccess to allow a web site to translate example.html to index.php?content=example (below) ErrorDocument 404 http://www.example.com RewriteEngine on RewriteRule ^/?(.*).html$ /index.php?content=$1
15
5121
by: Taki Jeden | last post by:
Hello everybody Does anybody know why w3c validator can not get pages that use 404 htaccess redirection? I set up two web sites so that clients request non-existent urls, but htaccess redirects calls to a script which parses the url and produces requested pages. It works fine with browsers, but when I try to validate the page I get a 404...
2
2825
by: Geradeaus | last post by:
I use htaccess to rewrite the url using the following rules : RewriteRule ^(+)/(+)/(+)?$ index.php?lang=$1&page=$2&id=$3 The only problem I have is when http://www.domain.com/admin is given, the "admin" is used as $1. How can I define the rule for every word given except "admin" ? Thanks in advance!
5
1310
by: frizzle | last post by:
Hi group, I know this isn't the right group, but i didn't know what group else it should be. I have a php/mySQL system, wich uses mod rewrite to enhance urls. I have the following RewriteRule: RewriteRule ^news(/{4}(/{2}(/+)?)?)?)?(/(index\.html)?)?$
5
4991
by: deko | last post by:
I'm trying to redirect requests for /index.php to /mydirectory/index.php If I use an index file in / with only this line: <?php header("Location:http://www.mysite.com/mydirectory/"); ?> that seems to work. But can this be accomplished more efficiently with an htaccess rewrite?
2
3733
by: RuthC | last post by:
Hi, In my website there is a facility for user to create there own pages we are maintaing this url as www.mywebsite.com/mypage/user created page name ex : www.mywebsite.com/mypage/ruth user created page name can contain alphanumeric charecters including '_' (no white space) I am using this code to redirect the user created pages ...
6
8895
by: vjayis | last post by:
Hi i m using htaccess to rewrite my urls., In this instead of http://www.mysite.com/index.php i want the url as http://www.mysite.com/home/ any ideas?? and also i m using the following code to redirect to the http://www.mysite.com/index.php when a non-existing filename is typed..
4
3852
n8kindt
by: n8kindt | last post by:
i'm trying to allow my website to use a http://ourdomain.com/fname.lname/ format. i am fairly certain my regex syntax is correct. here's what i have: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_URI} \/.+\.?.+\/*$ RewriteRule ^(.*)$ /index.php?path=$1 </IfModule> the weird thing is i can get the above...
6
558
by: mrozko | last post by:
Hi, I hope my message is not "out of topic".... I would like to make "clean URLs" on my website.... Is it possible to make something like this: orig. URL: /inde.php?mcat=1&subcat=2
4
5705
by: acs8 | last post by:
Hi there, I wonder if you can help me out. I'm trying to create clean URLs and so far I've managed to use .htaccess to convert the following URL: www.example.com/index.php?catagory=Section1&page=Page1 into: www.example.com/Section1/Page1/
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7559
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7123
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.