Jump to content

URL rewriting - Please help


spires

Recommended Posts

Hi Guys.

 

I'm trying create a dynamic website, but also making it SEO Friendly.

 

I am currently reading 'Professional Search Engine Optimization with PHP',

which seems to be a great book on the subject. However, I have hit a wall.

 

So, If you know anything about URL rewriting, then please can you help.

 

 

So far I have (MAC):

 

- Contacted my hosting, and they have said:

"The Apache mod_rewrite module is already loaded by default on the apache installation that comes with Redhat 4ES."

 

- Removed # from: #LoadModule rewrite_module libexec/httpd/mod_rewrite.so

- Removed # from: #AddModule mod_rewrite.c

- Restarted Apache

 

- Created .htaccess file with the following information:

RewriteEngine on

 

# Translate my-super.product.html to /product.php?product_id=123

RewriteRule ^my-super-product\.html$ /product.php?product_id=123

 

 

But, I just get the error: the webpage does not exist.

 

Please can you help, as I can't see what else I can do.

 

 

Thanks in advance

 

 

Link to comment
https://forums.phpfreaks.com/topic/108134-url-rewriting-please-help/
Share on other sites

Hi, Thanks for your help.

 

I've changed the .htaccess to:

RewriteEngine on

 

# Translate my-super.product.html to /product.php?product_id=123

RewriteRule ^my-super-product.html$ /product.php?product_id=123 [NC,L]

 

 

But it is throws me out.

Am I doing it right?

 

 

Thanks once again.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.