"hiding a url"?

Discuss practical ways rearrange URLs using mod_rewrite.

Postby davidgelb » Thu Nov 06, 2008 10:02 am

Well, that sucks! :(

I did see somewhere else that someone used this with mod_rewrite, I think. would this be any help?

RewriteCond %{HTTP_HOST} news.example.com
RewriteCond %{REQUEST_URI}!index.php/news/
RewriteRule ^(.*)$ index.php/news/$1 [L]

I tried adding to the .htaccess, but I get a 500 Internal Server error...I might just not have it set up correctly or might be missing something else in my .htaccess, but is this anything that might work?

Thanks,
David
davidgelb
 
Posts: 6
Joined: Sun Nov 02, 2008 9:04 pm

Postby richardk » Fri Nov 07, 2008 11:39 am

It doesn't do what you want. As far as i know there is no way without changing the server configuration or using mod_proxy.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby davidgelb » Fri Nov 14, 2008 7:24 am

Thank you Richard,
One last ditch effort...I found this information - would this be of help to my cause in any way?


The mod_proxy is not included into the default mod lists because it doesn't comply with our security requirements. The overall security of the server and therefore the customers accounts are our top priority.

The XMLHTTPRequest method in JavaScript has never been meant to make requests to a remote host and thus is the limitation applied within. Using apache's proxy mod is just a work around -- rather not really an elegant one, since it relies on the webserver being Apache running with installed non-default mod. The same can be achieved (and is usually the preferred way) by creating a server side script (for example a php script) which will fetch and process the data and return it to your XMLHTTPRequest method locally.


Thank you again for your help!

-David
davidgelb
 
Posts: 6
Joined: Sun Nov 02, 2008 9:04 pm

Postby richardk » Fri Nov 14, 2008 1:15 pm

It's saying that instead of using mod_proxy you could write a server-side script to do the proxying. Can you? Then it would be
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^$ /some_script [L]

And /some_script would make the request to mysite.com/mediashare.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Previous

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 27 guests

cron