473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

.htaccess file -> error 500


Hello,
Im using this .htaccess file to rewrite my websites URL. Reason i try
to do this is to make it more SEO friendly.

Code:
--------------------------------------------------------
Options +FollowSymLinks

RewriteEngine On
RewriteBase mywebsite.awardspace.com

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.+)\.html$ index.php?n=$1 [QSA,L]

--------------------------------------------------------

I keep getting the error 500, probably due to a faulty line behind the
RewriteBase.
How should i change this line to make it work?

Tnx,
Spamkip.

Nov 1 '07 #1
9 4379
invertigo wrote:
>
Hello,
Im using this .htaccess file to rewrite my websites URL. Reason i try
to do this is to make it more SEO friendly.

Code:
--------------------------------------------------------
Options +FollowSymLinks

RewriteEngine On
RewriteBase mywebsite.awardspace.com

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.+)\.html$ index.php?n=$1 [QSA,L]

--------------------------------------------------------

I keep getting the error 500, probably due to a faulty line behind the
RewriteBase.
How should i change this line to make it work?
Off-topic on comp.infosystems.www.authoring.html.
Follow up to alt.apache.configuration.

--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Nov 1 '07 #2
invertigo <sp*******@gmail.comwrites:
Im using this .htaccess file to rewrite my websites URL. Reason i try
to do this is to make it more SEO friendly.
"SEO friendly" is pure snake-oil.

If your page is valid HTML, your content will be accessible and indexable
by search engines. If your page is *not* valid, accessible HTML, then you
should fix the core problem instead of applying an SEO band-aid.
How should i change this line to make it work?
This group is about HTML authoring, not Apache configuration. Try asking
in the comp.infosystems.www.servers.unix group.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 1 '07 #3
Thank you very much for your reply's :)
Page is Valid HTML according to the W3C markup validator, The reason
im using this .HTaccess scripts is pretty simple, I'm using a CMS,
which codes the links like
http://mywebsite.com/?n=modules/forum
Wouldnt it be way better to .htaccess them to http://mywebsite.com/forum.html
? :)

Nov 1 '07 #4
Gazing into my crystal ball I observed invertigo <sp*******@gmail.com>
writing in news:11**********************@22g2000hsm.googlegro ups.com:
Thank you very much for your reply's :)
Page is Valid HTML according to the W3C markup validator, The reason
im using this .HTaccess scripts is pretty simple, I'm using a CMS,
which codes the links like
http://mywebsite.com/?n=modules/forum
Wouldnt it be way better to .htaccess them to
http://mywebsite.com/forum.html ? :)

If a page is well structured, then a robot has no problems with
querystrings.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Nov 1 '07 #5
On Thu, 01 Nov 2007 15:18:05 +0100, Adrienne Boswell <ar****@yahoo.com
wrote:
Gazing into my crystal ball I observed invertigo <sp*******@gmail.com>
writing in news:11**********************@22g2000hsm.googlegro ups.com:
>Thank you very much for your reply's :)
Page is Valid HTML according to the W3C markup validator, The reason
im using this .HTaccess scripts is pretty simple, I'm using a CMS,
which codes the links like
http://mywebsite.com/?n=modules/forum
Wouldnt it be way better to .htaccess them to
http://mywebsite.com/forum.html ? :)
If a page is well structured, then a robot has no problems with
querystrings.
A robot hasn't, people have. Ideally, I'd like to make urls guessable for
visitors, and easily remembered by previous visitors. Not all traffic
comes from links, word of mouth, printed media etc. can also attract
visitors. While this isn't strictly SEO (we 'skip' the search engine), I'd
think this it quite a good practise.
--
Rik Wasmus
Nov 1 '07 #6
invertigo wrote:
Thank you very much for your reply's :)
Page is Valid HTML according to the W3C markup validator, The reason
im using this .HTaccess scripts is pretty simple, I'm using a CMS,
which codes the links like
http://mywebsite.com/?n=modules/forum
Wouldnt it be way better to .htaccess them to
http://mywebsite.com/forum.html
? :)
Yes, it's a "better" URI, as it's more human friendly, and practically
less likely to change when you redesign your website, even though,
theoritically, you could keep the ugly URI as easily as the pretty URI.
However, experience shows that web designers who design ugly URI don't
bother keeping them alive.

However, http://mywebsite.com/forum is even better than
http://mywebsite.com/forum.html.

It doesn't directly affect search engines. However, if you keep your URI
alive, you'll be accessible from all the pages that refer to your site
(instead of displaying the 404 error), which, indirectly, will improve
your page rank, but, much more directly, will improve the accessibility of
your site.

Good URI don't change.

Now, back to your specific issue.
1) If your site has used the ugly URI for some time, then, do not change
it! Simply, keep them as they are forever, even if the underlying
architecture changes!
People don't like 404 errors. Neither do search engines.
A 301 redirection is better but, if you don't keep it forever, nobody will
ever update their links.
A 302 redirection that you would keep forever could be acceptable.

2) If your site has never ever been publically available with the ugly
URI, then, use the pretty one.

You may read this article written by Tim Berners Lee:
http://www.w3.org/Provider/Style/URI

--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Nov 1 '07 #7

My website hasnt been published yet, I do have a domain though :).
No need to redirect, I can just make them pretty right away, sounds
pretty feasable!

So yes, I am going for the pretty ones!
Problem is though, i cant get the .htaccess to work.. it keeps
bouncing back a 500 error, no matter what i stash behind the
RewriteBase tag.

This is the general .htaccess neat links code:
Code:
--------------------------------------------------------
Options +FollowSymLinks

RewriteEngine On
RewriteBase /subdomain/subsubdomain

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.+)\.html$ index.php?n=$1 [QSA,L]

--------------------------------------------------------

Concerning you idea bout removing the .html, that part isnt that hard
to accomplish, in fact, its just a simple rewrite of the
RewriteRule :). But getting first part to work.. nightmare.

Nov 1 '07 #8
invertigo wrote:
>
Hello,
Im using this .htaccess file to rewrite my websites URL. Reason i try
to do this is to make it more SEO friendly.
<snip>
RewriteBase mywebsite.awardspace.com
<snip>

That looks very suspicious.
Read:
http://httpd.apache.org/docs/2.2/mod...en#rewriterule

If there's an Alias such as: "Alias /url/path /dir/path", use a
RewriteBase such as "RewriteBase /url/path", otherwise, don't use
RewriteBase.

--
If you've a question that doesn't belong to Usenet, contact me at
<ta*****************@yahoDELETETHATo.fr>
Nov 1 '07 #9
..oO(invertigo)
>Im using this .htaccess file to rewrite my websites URL. Reason i try
to do this is to make it more SEO friendly.

Code:
--------------------------------------------------------
Options +FollowSymLinks

RewriteEngine On
RewriteBase mywebsite.awardspace.com

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.+)\.html$ index.php?n=$1 [QSA,L]

--------------------------------------------------------

I keep getting the error 500, probably due to a faulty line behind the
RewriteBase.
How should i change this line to make it work?
Logfiles exist. A 500 usually drops a message in the server's error log.
You could also enable the RewriteLog to see what's going on (or not).

Micha
Nov 1 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Joshua Beall | last post by:
Hi All, How do I disable magic quotes via .htaccess? I put the following file in my webroot, but it does not disable magic_quotes_gpc (according to phpinfo(), both the local and master value...
7
by: Nel | last post by:
Just looking for some general advice on modifying the URL for php. I am using .htaccess to allow a web site to translate example.html to index.php?content=example (below) ErrorDocument 404...
7
by: John | last post by:
Hello. I want to get this blasted .htaccess file sorted out, so I can have sessions without register_globals being on. I have looked everywhere for info on this and I mean everywhere...
13
by: Bob Bedford | last post by:
I've protected a directory with an .htaccess file. I'd like some of the files in this directory to be accessible by a scheduler that runs an "URL". The problem is that the scheduler runs scripts...
0
by: Stoco | last post by:
I am trying to create a generic interface that will manage various ..htaccess protected directories. In the ideal world, the .htaccess would trigger a cgi script that would take login information...
0
by: Jörg Braun | last post by:
Hello NG, i have a problem With WebRequest! i want to download a htaccess saved file over a proxyconnetion with authentication. Download a file what is not saved with htaccess is no problem,...
4
by: Stefan Bellon | last post by:
Hi all! I want to parse the contents of an .htaccess file from within PHP. The contents of the .htaccess file looks like this: <Files foobar.tar.gz> AuthType Basic AuthUserFile /foobar...
1
by: nickyeng | last post by:
I have checked this info from apache website, and i confused with it. Procteing System files it said: To run a really tight ship, you'll want to stop users from setting up .htaccess files...
0
by: asherwolf | last post by:
Hi, I'm trying to do something I think is pretty neat, but I've just about pulled my hair out by the behavior of my server. I'm hosting on GoDaddy, using a subdomain (www.mywebpage.com maps to...
0
by: deco12 | last post by:
Hi, I am new to web design and Apache, but have managed to password protect my site by putting a .htaccess file in the sites root directory. I have set it up so that a number of members have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.