473,405 Members | 2,141 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.

mod_rewrite and /

When you type in a url without a filename, e.g. www.google.com/, it
automatically looks for index.php (or whatever your web server is
configured to look for). I am having the problem where my CMS is
returning a page not found in this case.

Try typing in http://www.quick2m.com/izzy -- you get 404
Try typing in http://www.quick2m.com/izzy/index.php -- you get the
homepage

Is this something I can fix with mod_rewrite? How would I write a rule
that looks for a blank URL line and replaces it with index.php?

thanks,
Kevin
Feb 20 '08 #1
3 1458
Kevin Audleman schrieb:
When you type in a url without a filename, e.g. www.google.com/, it
automatically looks for index.php (or whatever your web server is
configured to look for). I am having the problem where my CMS is
returning a page not found in this case.

Try typing in http://www.quick2m.com/izzy -- you get 404
Try typing in http://www.quick2m.com/izzy/index.php -- you get the
homepage

Is this something I can fix with mod_rewrite? How would I write a rule
that looks for a blank URL line and replaces it with index.php?
No, this shouldn't normally happen.
Check
http://httpd.apache.org/docs/2.2/de/...directoryslash
and Directory-Index-Setting.
Feb 20 '08 #2
Kevin Audleman wrote:
When you type in a url without a filename, e.g. www.google.com/, it
automatically looks for index.php (or whatever your web server is
configured to look for). I am having the problem where my CMS is
returning a page not found in this case.

Try typing in http://www.quick2m.com/izzy -- you get 404
Try typing in http://www.quick2m.com/izzy/index.php -- you get the
homepage

Is this something I can fix with mod_rewrite? How would I write a rule
that looks for a blank URL line and replaces it with index.php?

thanks,
Kevin
alt.apache.configuration would be a much better place to ask this question.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 20 '08 #3
On Feb 20, 7:28*pm, Kevin Audleman <kevin.audle...@gmail.comwrote:
When you type in a url without a filename, e.g.www.google.com/, it
automatically looks for index.php (or whatever your web server is
configured to look for). I am having the problem where my CMS is
returning a page not found in this case.

Try typing inhttp://www.quick2m.com/izzy-- you get 404
Try typing inhttp://www.quick2m.com/izzy/index.php-- you get the
homepage

Is this something I can fix with mod_rewrite? How would I write a rule
that looks for a blank URL line and replaces it with index.php?

thanks,
Kevin
Hi Kevin,

I would suggest checking your apache httpd.conf file.

Look for DirectoryIndex and it should be something like this:

DirectoryIndex index.php index.xml index.html index.htm index.jsp

This should then allow you to find those pages when you just type in
e.g www.google.co.uk

Regards
Alex

Alex Richards
Ajtrichards Web Solutions
http://www.ajtrichards.co.uk
Feb 21 '08 #4

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

Similar topics

1
by: Westcoast Sheri | last post by:
Hello. How do I do this: If a visitor types in any number after my url, I want mod_rewrite to convert it to my url/anotherpage.html?number=number_visitor_typed Example: ...
4
by: Support | last post by:
Hello, I am running RedHat & Apache. RedHat does not allow creating more that 32000 subdirectories in one folder due to #defined constant limitation in the core code. I need to display 47000...
1
by: Shabam | last post by:
In Apache there's a pretty powerful module called mod_rewrite. Is there anything like that in dot net?
11
by: joelbyrd | last post by:
I have a people-networking type site in which each user has their own profile page, with their user id encoded. So, for example, the web address of their page might look like...
4
by: Hermann.Richter | last post by:
I want to rewrite URLs like http://domain/dir/file.php?var1=val1&var2=val2#anchor to http://domain/dir/file?var1=val1&var2=val2#anchor In other words, I want to strip out the php extension ...
5
by: laredotornado | last post by:
Hi, I have verified that mod_rewrite is enabled on my Apache 2.2 instance. However, now I'm having a problem just serving pages using .htaccess files. Following Rik's advice, my .htaccess file...
2
by: Susanne West | last post by:
hi group. i'm tackling a bigger project that will use mod_rewrite to patch a series of urls into a master php-script. this script builds the page framework that contains a series of elements...
3
by: Dr. No | last post by:
I am new to using mod_rewrite and am trying to rewrite a URL to pass values to my script so that: http://www.myclient.com/everything/animals/mammals/cats is transformed into ...
1
by: jaimebienlesfruits | last post by:
Hi, I'm currently using mod_rewrite to rewrite URLs with server variables. RewriteEngine on RewriteRule ^(+)$ /layout4/$1/ RewriteRule ^(+)/?$ index.php?dir=&page=$1 RewriteRule...
7
by: Dale | last post by:
again, i know this is OT...just move along to the next post if it bugs you. :) i had been trying to have this: project.66.204.32.110 from the client browser, map to a virtual host where the...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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.