Jump to content

[SOLVED] mod_rewrite on Apache with .htaccess


avvllvva

Recommended Posts

Hi,

The url rewriting is not functioning with my server, I need to change "current url" to "required url" as shown below

Current url : http://www.mydomain.com/seo/scripts/scriptname.php?article_id=45&article_name=noop

Required url : http://www.mydomain.com/seo/scripts/scriptname-article_id-45-article_name-noop.html

 

.htaccess file content

Options +FollowSymLinks

RewriteEngine on

RewriteRule scriptname-article_id-(.*)-article_name-(.*)\.html$

scriptname.php?article_id=$1&article_name=$2

 

Server details

Linux hosting

mod_rewrite module is loaded

 

These are the details and I have also tested the .htaccess file is functioning well with some other codes in the server.

So, anybody can help me, where is the problem ??????

 

Thanks

 

 

 

 

 

Its get solved.......I have tried some other urls, and now they are working perfect including the line 'Options +FollowSymLinks'

 

.htaccess

Options +FollowSymLinks

RewriteEngine on

RewriteRule ^product/([^/\.]+)/?$ product.php?id=$1 [L]

RewriteRule ^localnews/ localnews.php

 

thanx

 

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.