![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rewrite rules to change “link.html?hl=es” to “/es/link.html” etc? | Neo | Web Programming, Web 2.0 and Mashups | 2 | 08-07-2009 01:14 PM |
| Business Rules Forum 2008: Upper Ontology for Events, Processes, States, Rules | iBot | Complex Event Processing RSS News | 0 | 10-30-2008 10:00 AM |
| APACHE rewrite / redirect URL | ampo | Web Programming, Web 2.0 and Mashups | 2 | 10-27-2008 10:25 AM |
| APACHE rewrite / redirect URL | ampo | Security | 1 | 10-13-2008 04:27 AM |
| Apache Rewrite help! | hassan2 | UNIX for Advanced & Expert Users | 1 | 11-11-2002 01:35 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Apache rewrite rules.
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 Code:
RewriteCond %{REQUEST_URI} ^/dm5/Templates/.*
RewriteRule ^/dm5/Templates/(.*) http://172.20.224.23:80/templates/$1 [L]
RewriteRule ^/(.*) http://images:8080/$1 [L]
If i comment out "RewriteRule ^/(.*) http://images:8080/$1 [L] " then i am getting the error "File does not exist: " in htdocs folder. Please help me how to achieve my requirement. Thanks Samba Damerla |
|
||||
|
May be i didn't understood your question. The below are my rewrite rule i write this in Virtula_host section.
RewriteCond %{REQUEST_URI} ^/dm5/Templates/.* RewriteRule ^/dm5/Templates/(.*) http://172.20.224.23:80/templates/$1 [L] RewriteRule ^/(.*) http://images:8080/$1 [L] |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|