Forum Moderators: phranque

Message Too Old, No Replies

.htaccess

         

fireworkszone

10:19 am on May 16, 2011 (gmt 0)

10+ Year Member



Hi,

This is my first post and it concerns my website: [fireworkszone.com...]

The rewrite engine is on: RewriteEngine on

Typically, my tutorials have this type of urls:

www.fireworkszone.com/DimaMisc1_246.html

246 being the tutorial ID.

Recently, I created a new folder: 'investement' and what I want to avoid is this:

www.fireworkszone.com/investment/DimaMisc1_246.html
www.fireworkszone.com/investment/CarbonPattern_228.html
www.fireworkszone.com/investment/GUIIcons_621.html
www.fireworkszone.com/investment/Web20Styles2_390.html

What I would like is a new rule saying that this is impossible:

www.fireworkszone.com/investment/DimaMisc1_246.html

Thanks for your help

fireworkszone

12:13 pm on May 16, 2011 (gmt 0)

10+ Year Member



I would like a new rule to avoid reading the folder 'investment'.

Thanks for your help.

g1smd

12:17 pm on May 16, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



URLs are defined in links.

If you don't want
/investment/
in your URLs, do not have
/investment/
in the links on your pages.

You'll need an internal rewrite to connect the actual URL requests, after the link is clicked, to the internal server filepath where the content really resides.

fireworkszone

2:47 pm on May 16, 2011 (gmt 0)

10+ Year Member



URLs are defined in links.

If you don't want /investment/ in your URLs, do not have /investment/ in the links on your pages.


www.fireworkszone.com/investment/DimaMisc1_246.html

Actually, when I look into my folder 'investment' I can't find any DimaMisc1_246.html or else

If you add any word between www.fireworkszone.com/ and /DimaMisc1_246.html. It will work.


You'll need an internal rewrite to connect the actual URL requests, after the link is clicked, to the internal server filepath where the content really resides.



Could you help me write a rule avoiding such URL:

www.fireworkszone.com/investment/DimaMisc1_246.html


Thanks

g1smd

3:04 pm on May 16, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Turn off
MultiViews
.

fireworkszone

4:18 pm on May 16, 2011 (gmt 0)

10+ Year Member



When I place this line in my .htaccess file:

MultiViews off

I get a 500 error message.


What am I doing wrong?

fireworkszone

4:21 pm on May 16, 2011 (gmt 0)

10+ Year Member



MultiViews is not off by default?

g1smd

4:25 pm on May 16, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It may be off, but check it anyway.

Options -Multiviews

fireworkszone

5:02 pm on May 16, 2011 (gmt 0)

10+ Year Member



It may be off, but check it anyway.

Options -Multiviews



I am sorry but I don't know how to check if it is on or off

fireworkszone

7:38 pm on May 16, 2011 (gmt 0)

10+ Year Member



Anybody to help me out?

g1smd

8:35 pm on May 16, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



In .htaccess:

Options -Multiviews

fireworkszone

7:33 am on May 17, 2011 (gmt 0)

10+ Year Member



Hi,

I tried Options -Multiviews to turn it off and Options +Multiviews and got a 500 error message for both of them.

What does that suppose to mean?

If you want to see my environment: www.fireworkszone.com/phpinfo.php

How can you try to avoid this type of url?
www.fireworkszone.com/investment/DimaMisc1_246.html

Do you think an option should to use a rewriting rule with Options +FollowSymLinks like in [http://www.webmasterworld.com/apache/4311441.htm]?

Thanks for your help

fireworkszone

10:59 am on May 17, 2011 (gmt 0)

10+ Year Member



Could anyone create a code for this?

Thanks

fireworkszone

2:08 pm on May 17, 2011 (gmt 0)

10+ Year Member



I am ready to pay for the code. Anyone interested?

fireworkszone

1:33 pm on May 18, 2011 (gmt 0)

10+ Year Member



Why when I place Options -Multiviews and Options +Multiviews in my .htaccess file I get a 500 error message for both of them?

And what are those options are supposed to do?


To avoid this type of URL (www.fireworkszone.com/investment/DimaMisc1_246.html) I tried this but it doesn't work:

RewriteCond {HTTP_HOST} ^(www\.)?investment\.com:8000$
RewriteRule (.*) http://www.fireworkszone.com:8002/$1 [R=301,L]



Can you help me please?

lucy24

10:23 pm on May 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If both forms yield an error message, your host probably has a directive preventing you from overriding. Study the fine print.

[httpd.apache.org...]