473,915 Members | 6,883 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.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.award space.com

RewriteCond %{SCRIPT_FILENA ME} !-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 4406
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.award space.com

RewriteCond %{SCRIPT_FILENA ME} !-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.infosystem s.www.authoring.html.
Follow up to alt.apache.conf iguration.

--
If you've a question that doesn't belong to Usenet, contact me at
<ta************ *****@yahoDELET ETHATo.fr>
Nov 1 '07 #2
invertigo <sp*******@gmai l.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.infosystem s.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*******@gmai l.com>
writing in news:11******** **************@ 22g2000hsm.goog legroups.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.c om
wrote:
Gazing into my crystal ball I observed invertigo <sp*******@gmai l.com>
writing in news:11******** **************@ 22g2000hsm.goog legroups.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************ *****@yahoDELET ETHATo.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_FILENA ME} !-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.award space.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 "RewriteBas e /url/path", otherwise, don't use
RewriteBase.

--
If you've a question that doesn't belong to Usenet, contact me at
<ta************ *****@yahoDELET ETHATo.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

RewriteEngin e On
RewriteBase mywebsite.award space.com

RewriteCond %{SCRIPT_FILENA ME} !-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
50640
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 are still "on") <IfModule mod_php4.c> php_value upload_max_filesize 8M
7
3692
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 http://www.example.com RewriteEngine on RewriteRule ^/?(.*).html$ /index.php?content=$1
7
7558
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 including the php.net manual. In the manual it said to include something like the following:
13
2563
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 in this directory, so the server asks a username and password. How to avoid this ??? Should I set the .htaccess file to allow GET, but how ??? and what would be the URL ??? directory tree:
0
3726
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 and store it to a file, or block access all together. For example, anytime someone logs in, the .htaccess file should direct the user name and IP address to be stored in a log file through this cgi. A cron could be scheduled to determine if the...
0
1698
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, download a htaccess saved file with out a proxy with authentication i also no problem, but download this file with htaccess and the auth proxy is a prob!
4
2820
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 AuthName "Foobar" <Limit GET>
1
4904
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 which can override security features you've configured. Here's one way to do it. In the server configuration file, put
0
11295
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 /mywebpage), running Apache 1.3.33, and PHP 4.3.11. The goal is to use PHP to install an .htaccess file in a folder to forbid PHP files from being accessed from outside the server. I have a working .htaccess file in one folder, and I have been...
0
2143
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 access to the site. Now, within the site I have a link to a "document" folder which I only want 2 or 3 members to have access to. I have created a second .htaccess & .ht passwd file, with the path to the new folder and a different password. This was...
0
10039
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9881
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9732
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7256
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5943
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3368
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.