Sponsored Content
Top Forums Web Development Mod_rewrite to handle paths ? Post 303032753 by MaxtheCat on Saturday 23rd of March 2019 12:20:36 AM
Old 03-23-2019
Quote:
Originally Posted by Neo
I'm not an Angular fan, sorry.

Either way, you should watch a few YT video tutorials first, IMHO.

The world has shifted away from asking a lot of basic questions in forums before at least watching a few video tutorials.

It's the modern day version of "RTFM".... but instead it's "Watch the F... ing Videos" (WTFV) .... LOL .

Seriously, watch some videos. They are great and FREE.

This is true, what I've noticed. I'll stick with that app even if it's old after watching the videos, then if I have questions; I'll ask. I can't find anything similar and I fumbled upon that app as I need something like that for the work I do.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mod_rewrite problem

hi i'm very new to mod_rewrite. I can't seem to have this work. I have a site which has 4 pages : home, links, adverts and contacts page. the adverts page is linked to this url http://www.xxxxxx.com/adverts.php. What i want is that whenever the adverts page is clicked , it will show... (0 Replies)
Discussion started by: arsonist
0 Replies

2. Web Development

mod_rewrite RewriteMap - possible to 404?

In my strenuous efforts to get SEO-friendly urls, I'm using a rewrite map in my apache setup: RewriteEngine on RewriteOptions MaxRedirects=5 RewriteMap seo prg:/Applications/MAMP/htdocs/map.php #map requests for the original file to the new SEO friendly urls RewriteCond... (0 Replies)
Discussion started by: sneakyimp
0 Replies

3. Web Development

mod_rewrite help

Here's my situation. When a user access the site domain.com it redirects to /portal which displays SKIN1 by default. When a user accesses the site domain.com/portal?branding=SKIN1 it displays SKIN1 by default as well. When a user access the site domain.com/portal?branding=SKIN2 it... (0 Replies)
Discussion started by: Adrnalnrsh
0 Replies

4. Web Development

Apache mod_rewrite: from 'friendly' url to actual path

I'd like to translate a friendly url such as: http://www.xxxyyyzzz.com/page/12345678/ to: http://www.xxxyyyzzz.com/page/12/34/56/78/ Seems simple enough, but I cannot figure out how. Any one done this before? (2 Replies)
Discussion started by: markericksen
2 Replies

5. Shell Programming and Scripting

Need help with mod_rewrite rule, redirect

I have to redirect http://www.domain.com/(*)/(*)-hotel-deals.html to http://www.domain.com/(*)/(*)-hotel-deals where of course (*) are dynamic. Any ideas how this could be accomplished? (0 Replies)
Discussion started by: EXT3FSCK
0 Replies

6. UNIX for Dummies Questions & Answers

Difference between handle to the thread HANDLE and thread identifier pthread_t

This question might be silly but its confusing me a bit: What is the difference between handle to the thread HANDLE and thread identifier pthread_t? ---------- Post updated at 01:52 PM ---------- Previous update was at 01:48 PM ---------- Sorry I saw details and HANDLE is in windows and... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

7. Web Development

Mod_rewrite http to https

Hi Team, I have a question on the apache mod_rewrite module. I have a requirement of rewriting only specific url's to https. Requirement below:- want to match a word (test) on the url and if matches then it should rewrite to https. example:- ... (1 Reply)
Discussion started by: arumon
1 Replies

8. UNIX for Advanced & Expert Users

Apache Mod_rewrite Mystery

Hi Folks, I am running on a CentOS 6.3 server, whose primary function until recently has been my Zimbra mail server exclusively. I added wordpress and I have not been disappointed, with this one exception of Apache mod_rewrite. I have already tried to set selinux to permisive to eliminate that... (5 Replies)
Discussion started by: cjm51213
5 Replies

9. Web Development

Mod_rewrite - URL rewrite based upon HTTP_REFERER

Hello, I have added following rewrite cond and rewrite rules but it does not work. RewriteCond %{HTTP_REFERER} ^http://192\.168\.1\.150/categories/.*$ RewriteRule ^(.*)$ http://www.blahblah.com/ When I hit url : http://192.168.1.150/categories/881-Goes?page=7 in my browser - it... (2 Replies)
Discussion started by: ashokvpp
2 Replies
Tie::DxHash(3)						User Contributed Perl Documentation					    Tie::DxHash(3)

NAME
Tie::DxHash - keeps insertion order; allows duplicate keys SYNOPSIS
use Tie::DxHash; my(%vhost); tie %vhost, 'Tie::DxHash' [, LIST]; %vhost = ( ServerName => 'foo', RewriteCond => 'bar', RewriteRule => 'bletch', RewriteCond => 'phooey', RewriteRule => 'squelch', ); DESCRIPTION
This module was written to allow the use of rewrite rules in Apache configuration files written with Perl Sections. However, a potential user has stated that he needs it to support the use of multiple ScriptAlias directives within a single Virtual Host (which is required by FrontPage, apparently). If you find a completely different use for it, great. The original purpose of this module is not quite so obscure as it might sound. Perl Sections bring the power of a general-purpose programming language to Apache configuration files and, having used them once, many people use them throughout. (I take this approach since, even in sections of the configuration where I do not need the flexibility, I find it easier to use a consistent syntax. This also makes the code easier for XEmacs to colour in ;-) Similarly, mod_rewrite is easily the most powerful way to perform URL rewriting and I tend to use it exclusively, even when a simpler directive would do the trick, in order to group my redirections together and keep them consistent. So, I came up against the following problem quite early on. The synopsis shows some syntax which might be needed when using mod_rewrite within a Perl Section. Clearly, using an ordinary hash will not do what you want. The two additional features we need are to preserve insertion order and to allow duplicate keys. When retrieving an element from the hash by name, successive requests for the same name must iterate through the duplicate entries (and, presumably, wrap around when the end of the chain is reached). This is where Tie::DxHash comes in. Simply by tying the offend- ing hash, the corresponding configuration directives work as expected. Running an Apache syntax check (with docroot check) on your configuration file (with "httpd -t") and checking virtual host settings (with "httpd -S") succeed without complaint. Incidentally, I strongly recommend building your Apache configuration files with make (or equivalent) in order to enforce the above two checks, preceded by a Perl syntax check (with "perl -cx"). INTERNALS
For those interested, Tie::IxHash works by storing the hash data in an array of hash references (containing the key/value pairs). This preserves insertion order. A separate set of iterators (one per distinct key) keeps track of the last retrieved value for a given key, thus allowing the successive retrieval of multiple values for the same key to work as expected. SEE ALSO
perltie(1), for information on ties generally. Tie::IxHash(3), by Gurusamy Sarathy, if you need to preserve insertion order but not allow duplicate keys. For information on Ralf S. Engelschall's powerful URL rewriting module, mod_rewrite, check out the reference documentation at "http://httpd.apache.org/docs/mod/mod_rewrite.html" and the URL Rewriting Guide at "http://httpd.apache.org/docs/misc/rewriteguide.html". For help in using Perl Sections to configure Apache, take a look at the section called "Apache Configuration in Perl" at "http://perl.apache.org/guide/config.html#Apache_Configuration_in_Perl", part of the mod_perl guide, by Stas Bekman. Alternatively, buy the O'Reilly book Writing Apache Modules with Perl and C, by Lincoln Stein & Doug MacEachern, and study Chapter 8: Customizing the Apache Configuration Process. BUGS
The algorithms used to retrieve and delete elements by key run in O(N) time, so do not expect this module to work well on large data sets. This is not a problem for the module's intended use. If you find another use for the module which involves larger quantities of data, let me know and I will put some effort into optimising for speed. The mod_rewrite directives for which this module was written (primarily RewriteCond and RewriteRule) can occur in all four con- figuration file contexts (i.e. server config, virtual host, directory, .htaccess). However, Tie::DxHash only helps when you are using a directive which is mapped onto a Perl hash. This limits you to directives which are block sections with begin and end tags (like <VirtualHost> and <Directory>). I get round this by sticking my mod_rewrite directives in a name-based virtual host container (as shown in the synopsis) even in the degenerate case where the web server only has one virtual host. AUTHOR
Kevin Ruscoe perl v5.8.0 2001-06-15 Tie::DxHash(3)
All times are GMT -4. The time now is 09:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy