HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Apache2 rewrite rules
Operating System - Linux
1828000
Members
3204
Online
109973
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2009 07:31 PM
05-14-2009 07:31 PM
Hi there
I need to hide some parts of the links in my domain:
http://www.my-domain.pl/1275-long-xdgt-bbbb-ccc-p-124.html?sale=LG-12.75-long-xdgt-bbbb-ccc
I want to show only http://www.my-domain.pl/ .
I also have some rules but they don't work:
RewriteEngine On
rewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(php|html?)\ HTTP/
rewriteRule ^index\.(php|html?)$ http://www.my-domain.pl/ [R=301,L]
#
rewriteCond %{HTTP_HOST} ^www.www.my-domain.pl\.pl
rewriteRule (.*) http://www.my-domain.pl/$1 [R=301.L]
I'm still getting very long strings in the address bar.
Is there anyone who could explain why the rules wan't work ?
Reagrds
Peter
I need to hide some parts of the links in my domain:
http://www.my-domain.pl/1275-long-xdgt-bbbb-ccc-p-124.html?sale=LG-12.75-long-xdgt-bbbb-ccc
I want to show only http://www.my-domain.pl/ .
I also have some rules but they don't work:
RewriteEngine On
rewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(php|html?)\ HTTP/
rewriteRule ^index\.(php|html?)$ http://www.my-domain.pl/ [R=301,L]
#
rewriteCond %{HTTP_HOST} ^www.www.my-domain.pl\.pl
rewriteRule (.*) http://www.my-domain.pl/$1 [R=301.L]
I'm still getting very long strings in the address bar.
Is there anyone who could explain why the rules wan't work ?
Reagrds
Peter
Jesus is the King
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2009 12:16 AM
05-15-2009 12:16 AM
Solution
The rewrite rules only manipulate requests coming in from the browser, not the replies going out from the server.
Rewriting your long URL to point to the short URL would only make the long URL impossible to reach: any attempts to access it would only return the title page of your domain instead.
Usually the hiding of the long links is performed by first sending a frameset to the browser, then updating only the inner frames of the frameset. (i.e. the short URL sends the frameset and a some sort of session key, which might be a session cookie or a field in the inner-page URLs. If someone tries to access the inner pages without a valid session key, they can be redirected to the title page to pick up the frameset first.)
Of course, all data you send to the browser will be accessible to the user in some way: don't build your site security on the assumption that "nobody uses View Source".
MK
Rewriting your long URL to point to the short URL would only make the long URL impossible to reach: any attempts to access it would only return the title page of your domain instead.
Usually the hiding of the long links is performed by first sending a frameset to the browser, then updating only the inner frames of the frameset. (i.e. the short URL sends the frameset and a some sort of session key, which might be a session cookie or a field in the inner-page URLs. If someone tries to access the inner pages without a valid session key, they can be redirected to the title page to pick up the frameset first.)
Of course, all data you send to the browser will be accessible to the user in some way: don't build your site security on the assumption that "nobody uses View Source".
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2009 03:50 AM
05-15-2009 03:50 AM
Re: Apache2 rewrite rules
Shalom,
To achieve this goal, re-arrange the content on the server to a different layout.
SEP
To achieve this goal, re-arrange the content on the server to a different layout.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP