Masking URL


I had someone create a gallery for me, and once they have done it, there is a funny URL part at the end. I want to find out if its true that its not possible to get rid of it, or were they just lazy :slight_smile:

The url looks like this: and i want it to look like this:

This code seems to control the whole section for the gallery i am not sure if this is the actual code where the url is being dragged from:

[php]<?php /** Template Name: Single portfolio Page Template */ ?>

<?php get_header(portfolio) ?> #gallery { padding: 30px; /* background: #e1eef5;*/ } #descriptions { position: relative; height: 50px; background: #EEE; margin-top: 10px; width: 640px; padding: 10px; overflow: hidden; } #descriptions .ad-image-description { position: absolute; } #descriptions .ad-image-description .ad-description-title { display: block; }
<?php $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $url1=explode('/',$url); //print_r($url1); ?>
<div id="page">
   $cat_name = strtolower(get_the_title());
   $cat_sql = "select * from wp_portfolio_category where cat_name='".$cat_name."'";
   $cat_res = mysql_query($cat_sql);
   $cat_row = mysql_fetch_array($cat_res);

<? $string=$cat_name; $string1 = str_replace('-', ' ', $string); ?><? echo $string1; ?>

Home » <? echo $string1; ?>
<? //the_field('left_side_content'); echo $cat_row['first_description']; ?>
  <div class="ad-controls">
  <div class="ad-nav">
    <div class="ad-thumbs">
      <ul class="ad-thumb-list">
      	$sql_fetch_fetch_category_name=" select * from wp_portfolio_image where cat_name='$url1[3]' ";
		while($res_fetch_wp_portfolio_image=mysql_fetch_array($re_fetch_wp_portfolio_image)) {
          <a href="<? echo $res_fetch_wp_portfolio_image['image_path']; ?>">
            <img src="<? echo $res_fetch_wp_portfolio_image['image_path']; ?>" class="image<? echo $i; ?>">
       <? $i++; }  ?>

	<!-- END #portfolio_image -->
    <div class="portfolio_down_left">        
    <? //the_field('down_content'); 
	echo $cat_row['second_description'];?>
    <div class="portfolio_down_right">
    <? //the_field('down_content_second'); 
	echo $cat_row['third_description'];?>

		 END #page_content -->		

		<!-- START #page_sidebar 				
		<div id="page_sidebar">-->
			<?php //fw_sidebar($post->ID) ?>
		<!-- </div>
		END #page_sidebar -->		
		<div class="clear"></div>

<!-- END #page -->	
<?php get_footer() ?>[/php]

If someone could help or atleast point me to the right direction I would be most thankful

If you’re trying to go from index.php?something=something to just index.php, you’ll need to use mod rewrite. Lots of good tutorials on it.

I am kinda beginner in php, the thing is when i go to the section of the website as described, once the gallery loads I get this silly #ad-image-0 after my initial url. I dont want it to appear, not sure why they coded it this way. So i am looking for a simple solution to get rid of this.

Sponsor our Newsletter | Privacy Policy | Terms of Service