Hm.. Is it possible that someone here can whip me up something that does this? I'd like all .mp3,wav,mpg etc files to be 'redirected' somewhere else.. a blank file preferably. This is to prevent bandwidth leeching. I don't care whether the links don't load properly in the user's media player.
I have having some htaccess problems. Is there a particular permission setting or owner for that document to work properly? I am using 755 and root is the owner, is that my problem? My post today with detailed problem. http://forums.digitalpoint.com/showthread.php?t=81546 My 2 week old post, where I solved it before I totally messed it up. http://forums.digitalpoint.com/showthread.php?t=78405
Thank you very much. This thread help me to understand mod_rewrite easier and I just apply to my web directory http://directory.krpmag.com/ hehe
Hi guys, maybe you can help me, it's the third day I am fighting with rewrite and it still wins I have a php ld directory and I am trying to make it seo friendly before annoucement. Now I am using rewrite like this: RewriteEngine on RewriteCond %{HTTP_HOST} ^juliawebdirectory\.com RewriteRule ^(.*)$ http://www.juliawebdirectory.com/$1 [R=permanent,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^Architecture(.*) index.php [R=301,L] it worked fine for several lines but there are 273 lines for categories and subcategories and after ~30th pages start returning 404 error. Now there are [R=301,L] for all lines and none of them work. If I delete [R=301,L] everything works fine but I would like to have exactly 301 redirect instead of 302 defalt. What am I doing wrong, how to fix the problem? And can somebody help me with code for making urls of category and subcategory pages to be like this http://www.juliawebdirectory.com/Arts/Architecture.php http://www.juliawebdirectory.com/Arts/Architecture2.php and so on instead of current http://www.juliawebdirectory.com/Arts/Architecture/ Thank you! Julia
This code doesn't work for me, can someone help? percentageproducts.com/home.php?id=main to percentageproducts.com/main.htm Please help. Thanks
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^([^.]+)\.htm$ home.php?id=$1 [L] or for only that one URL, RewriteRule ^main\.htm$ home.php?id=main [L] JII, make a thread about that one.
I have this problem, I want to use this url http://test.com/test.php?user_id=1 but it should redirect to this url (original one) when use click on http://test.com/classifieds/test.php?user_id=1 Is it possible with mod rewriting? If so please help me, I have try several modrewriting without success.
er why even use mod_rewrite if it won't be static. Changing the URL is worthless. Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^test.php?user_id=([^.]+)$ classifieds/test.php?user_id=$1 [L]
Thanks Nintendo, But it doesn't work, seems something wrong some where. Why I need this....Already I have static urls by modrewrite, in these pages, there are links to page like this http://test.com/test.php?user_id=1 but these pages don't load since correct url is http://test.com/classifieds/test.php?user_id=1 in the folder 'classified' I can't change links in those pages by changeing HTML, since it will affect pages without modrewiting. I want to keep both modrewrited pages as well as pages without modrewrite. Hope you understand my problrm.
Do this little test and see if mod_rewrite even works. Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^wacko\.html$ index.php [L] Change index.php if that's not the URL of the index page, then go to domain.com/wacko.html If you got mod_rewrite, that URL will work.
I have some question,, my mod_rewrite didn't work in the way I want. I'm not sure what's wrong I want to use it for image anti-leeching by redirect to my script with image URL and produce the image Please tell me what's wrong with above code.
I am stuck and I need a help, I have a site made in ASP hosted on Windows server, now I have to move the site on linux/Apache server which does not support ASP, I got the site translated in the PHP/HTML. but the problem is that all the ASP pages are listed in the search engines and have good PR. Is there any way that I can rewrite my URLs as such that they ommit .asp extention, new page names are the same as old one. i.e - webpackage.asp is now changed to webpackage.htm and I want that when retirved it should ommit the page as the old name with .asp extention. ASP sucks, help me please.
Oh gees... You're only posting in here because...!!! Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^(.*)\.asp$ http://www.domain.com/$1.html [R=301,L] redirects from asp to html to destroy the duplicate content bug...once Google updates it...one of these years. That'll be $49.99 for the super secret code.
Not Working Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a server error, please contact the webmaster. Error 500 HTML: Giving me this error, when I placed it under WWW folder or My site folder.
Try this test Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^wacko\.html$ index.html [L] domain.com/.htaccess Change index.html to what ever the index file name is. Then domain.com/wacko.html should show the index page.